Fix regression when removing watches
authorLuiz Augusto Von Dentz <luiz.dentz-von@nokia.com>
Fri, 8 Jan 2010 10:17:19 +0000 (12:17 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 8 Jan 2010 12:23:56 +0000 (04:23 -0800)
commitdc1b04588d7f08bda9d6df073fb477f89d60fb2f
tree89b9ac8d4399be5ce304d759c868e8ef15db33e0
parent2271c9fed743991d83ece8a7650b547d0391d1fc
Fix regression when removing watches

filter_data_find return the first data registered in this case so there is
no guarantee that it return the same data as passed to
filter_data_remove_callback which is the one that should be removed.

The fix is to simple cache the connection removing the correct data before
checking if there is any filter left.
gdbus/watch.c