@@ 864,13 864,15 @@ void UpdateMuditaOS::setInitialHistory(const std::string &initialHistory)
updateHistory = json11::Json();
}
}
+
void UpdateMuditaOS::informUpdateWindow()
{
fs::path file = UpdateMuditaOS::checkForUpdate();
auto msgToSend = std::make_shared<sdesktop::UpdateOsMessage>(updateos::UpdateMessageType::UpdateNow, file);
msgToSend->updateStats.versionInformation = UpdateMuditaOS::getVersionInfoFromFile(file);
msgToSend->updateStats.status = status;
- owner->bus.sendUnicast(msgToSend, app::name_desktop);
+ if (owner)
+ owner->bus.sendUnicast(msgToSend, app::name_desktop);
}
void UpdateMuditaOS::storeRunStatusInDB()
@@ 247,11 247,11 @@ TEST_CASE("Context class test")
REQUIRE(context.getUuid() == 12345);
REQUIRE(context.getEndpoint() == EndpointType::contacts);
REQUIRE(context.createSimpleResponse() ==
- R"(#000000061{"body": null, "endpoint": 7, "status": 200, "uuid": 12345})");
+ R"(#000000059{"body": null, "endpoint": 7, "status": 200, "uuid": 12345})");
context.setResponseBody(context.getBody());
REQUIRE(context.createSimpleResponse() ==
- R"(#000000073{"body": {"test": "test"}, "endpoint": 7, "status": 200, "uuid": 12345})");
+ R"(#000000071{"body": {"test": "test"}, "endpoint": 7, "status": 200, "uuid": 12345})");
}
SECTION("Invalid message")
{