diff options
author | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2009-04-02 11:04:43 -0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2009-04-03 12:23:08 +0300 |
commit | 50686653da5e85ad30d705f15975dcdefd32f6cd (patch) | |
tree | db62115eed7fa003e10ddb9d2f0280ff635dad26 /gdbus | |
parent | 9cf730b6266aad1f11a72e80163e3e9e5c22260b (diff) | |
download | bluez-50686653da5e85ad30d705f15975dcdefd32f6cd.tar.gz |
Fix g_dbus_remove_all_watches to remove all watches for the given connection.
Diffstat (limited to 'gdbus')
-rw-r--r-- | gdbus/watch.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/gdbus/watch.c b/gdbus/watch.c index 2354ed5df..7d7853fc8 100644 --- a/gdbus/watch.c +++ b/gdbus/watch.c @@ -382,13 +382,10 @@ void g_dbus_remove_all_watches(DBusConnection *connection) { struct name_data *data; - data = name_data_find(connection, NULL); - if (!data) { - error("name_listener_indicate_disconnect: no listener found"); - return; + while ((data = name_data_find(connection, NULL))) { + name_listeners = g_slist_remove(name_listeners, data); + name_data_call_and_free(data); } - debug("name_listener_indicate_disconnect"); - - name_data_call_and_free(data); + dbus_connection_remove_filter(connection, name_exit_filter, NULL); } |