assert(bus);
assert(m);
+
+ if (!m->api_bus)
+ return;
+
assert(m->api_bus == bus);
m->request_api_bus_dispatch = status != DBUS_DISPATCH_COMPLETE;
assert(bus);
assert(m);
+
+ if (!m->system_bus)
+ return;
+
assert(m->system_bus == bus);
m->request_system_bus_dispatch = status != DBUS_DISPATCH_COMPLETE;
/* dbus_message_get_path(message)); */
if (dbus_message_is_signal(message, DBUS_INTERFACE_LOCAL, "Disconnected")) {
- log_error("Warning! D-Bus connection terminated.");
+ log_error("Warning! API D-Bus connection terminated.");
bus_done_api(m);
} else if (dbus_message_is_signal(message, DBUS_INTERFACE_DBUS, "NameOwnerChanged")) {
/* dbus_message_get_path(message)); */
if (dbus_message_is_signal(message, DBUS_INTERFACE_LOCAL, "Disconnected")) {
- log_error("Warning! D-Bus connection terminated.");
+ log_error("Warning! System D-Bus connection terminated.");
bus_done_system(m);
} if (dbus_message_is_signal(message, "org.freedesktop.systemd1.Agent", "Released")) {
if (m->system_bus == m->api_bus)
m->system_bus = NULL;
- dbus_connection_close(m->api_bus);
dbus_connection_set_dispatch_status_function(m->api_bus, NULL, NULL, NULL);
+ dbus_connection_close(m->api_bus);
dbus_connection_unref(m->api_bus);
m->api_bus = NULL;
-
}
if (m->subscribed) {
bus_done_api(m);
if (m->system_bus) {
- dbus_connection_close(m->system_bus);
dbus_connection_set_dispatch_status_function(m->system_bus, NULL, NULL, NULL);
+ dbus_connection_close(m->system_bus);
dbus_connection_unref(m->system_bus);
m->system_bus = NULL;
}