chiark / gitweb /
dbus: don't try to connect to the system bus before it is actually up
[elogind.git] / src / unit.c
index 7d673e138d291340b7eb334ea620bf51eb8060c7..a7e6714c4508a5855d8d1158ab780fa3de06e714 100644 (file)
@@ -1067,7 +1067,7 @@ static void retroactively_stop_dependencies(Unit *u) {
                         unit_check_unneeded(other);
 }
 
-void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns) {
+void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_success) {
         dual_timestamp ts;
         bool unexpected;
 
@@ -1134,7 +1134,7 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns) {
 
                         if (u->meta.job->state == JOB_RUNNING) {
                                 if (ns == UNIT_ACTIVE)
-                                        job_finish_and_invalidate(u->meta.job, true);
+                                        job_finish_and_invalidate(u->meta.job, reload_success);
                                 else if (ns != UNIT_ACTIVATING && ns != UNIT_RELOADING) {
                                         unexpected = true;
 
@@ -1194,7 +1194,7 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns) {
                         /* The bus just might have become available,
                          * hence try to connect to it, if we aren't
                          * yet connected. */
-                        bus_init(u->meta.manager);
+                        bus_init(u->meta.manager, true);
 
                 if (unit_has_name(u, SPECIAL_SYSLOG_SERVICE))
                         /* The syslog daemon just might have become