Commit c0bd0cf7 authored by Lennart Poettering's avatar Lennart Poettering
Browse files

dbus: don't hit an assert if we sent a changed signal for something not in the...

dbus: don't hit an assert if we sent a changed signal for something not in the dbus queue (i.e. because it was deleted before it was fully created
parent 90d473a1
...@@ -172,10 +172,11 @@ void bus_job_send_change_signal(Job *j) { ...@@ -172,10 +172,11 @@ void bus_job_send_change_signal(Job *j) {
DBusMessage *m = NULL; DBusMessage *m = NULL;
assert(j); assert(j);
assert(j->in_dbus_queue);
LIST_REMOVE(Job, dbus_queue, j->manager->dbus_job_queue, j); if (j->in_dbus_queue) {
j->in_dbus_queue = false; LIST_REMOVE(Job, dbus_queue, j->manager->dbus_job_queue, j);
j->in_dbus_queue = false;
}
if (!bus_has_subscriber(j->manager) && !j->bus_client) { if (!bus_has_subscriber(j->manager) && !j->bus_client) {
j->sent_dbus_new_signal = true; j->sent_dbus_new_signal = true;
......
...@@ -371,10 +371,11 @@ void bus_unit_send_change_signal(Unit *u) { ...@@ -371,10 +371,11 @@ void bus_unit_send_change_signal(Unit *u) {
DBusMessage *m = NULL; DBusMessage *m = NULL;
assert(u); assert(u);
assert(u->meta.in_dbus_queue);
LIST_REMOVE(Meta, dbus_queue, u->meta.manager->dbus_unit_queue, &u->meta); if (u->meta.in_dbus_queue) {
u->meta.in_dbus_queue = false; LIST_REMOVE(Meta, dbus_queue, u->meta.manager->dbus_unit_queue, &u->meta);
u->meta.in_dbus_queue = false;
}
if (!bus_has_subscriber(u->meta.manager)) { if (!bus_has_subscriber(u->meta.manager)) {
u->meta.sent_dbus_new_signal = true; u->meta.sent_dbus_new_signal = true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment