Skip to content

Commit e88154e

Browse files
Olav Herbst (hro2hi)OleksandrChaika
Olav Herbst (hro2hi)
authored andcommitted
DBusRaucInstaller: enabled D-Bus signal handling directly after getBundleVersion calls
1 parent 5127591 commit e88154e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Install/DBusRaucInstaller.cpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ namespace sua {
160160
std::string DBusRaucInstaller::getBundleVersion()
161161
{
162162
std::string bundleVersion = getDBusRaucBundleVersion();
163+
g_main_context_iteration(g_main_loop_get_context(loop), FALSE);
163164

164165
if(bundleVersion == VERSION_UNAVAILABLE) {
165166
bundleVersion = getOsVersionId();
@@ -169,7 +170,10 @@ namespace sua {
169170

170171
std::string DBusRaucInstaller::getBundleVersion(const std::string& input)
171172
{
172-
return getDBusRaucBundleVersion(input);
173+
std::string bundleVersion = getDBusRaucBundleVersion(input);
174+
g_main_context_iteration(g_main_loop_get_context(loop), FALSE);
175+
176+
return bundleVersion;
173177
}
174178

175179
void DBusRaucInstaller::subscribeDBusSignals()
@@ -439,7 +443,7 @@ namespace sua {
439443
connectionError->message);
440444
}
441445

442-
Logger::trace("Retrieved version of the incoming bundle is: {}", bundleVersion);
446+
Logger::trace("Retrieved version of the incoming bundle is: '{}'", bundleVersion);
443447
return bundleVersion;
444448
}
445449

0 commit comments

Comments
 (0)