Commit b93b6037 authored by Szymon Janc's avatar Szymon Janc Committed by Marcel Holtmann

gdbus: Fix not calling disconnect function

If daemon gets disconnected from D-Bus sender is NULL. Watches that
was explicitly added with NULL sender (ie disconnected_signal in
g_dbus_set_disconnect_function) should be called anyway.
parent 61c0467e
......@@ -523,9 +523,7 @@ static DBusHandlerResult message_filter(DBusConnection *connection,
member = dbus_message_get_member(message);
dbus_message_get_args(message, NULL, DBUS_TYPE_STRING, &arg, DBUS_TYPE_INVALID);
/* Sender is always the owner */
if (sender == NULL)
/* If sender != NULL it is always the owner */
for (current = listeners; current != NULL; current = current->next) {
data = current->data;
......@@ -533,6 +531,9 @@ static DBusHandlerResult message_filter(DBusConnection *connection,
if (connection != data->connection)
if (!sender && data->owner)
if (data->owner && g_str_equal(sender, data->owner) == FALSE)
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