gdbus/watch: Fix aborting when removing D-Bus filter
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 3 Sep 2013 15:00:35 +0000 (18:00 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 12 Sep 2013 15:25:23 +0000 (08:25 -0700)
commit3849da14e525476fab0670ad0c6f5609815e5281
tree8ad0a146d275245ec34432399f004b40cd18be64
parent68cc171e401b12b4ba6692d0888c35f2bcfb4f17
gdbus/watch: Fix aborting when removing D-Bus filter

In case of filter_data having a watch to a service name it may call
dbus_connection_remove_filter twice causing libdbus to abort:

process 24723: Attempt to remove filter function 0x4063e0 user data (nil), but no such filter has been added

To fix this the code will now only attempt to call
dbus_connection_remove_filter once in filter_data_free which is the
counterpart of filter_data_get where dbus_connection_add_filter is called.
gdbus/watch.c