aboutsummaryrefslogtreecommitdiffstats
path: root/attrib/client.c
diff options
context:
space:
mode:
authorAnderson Lizardo <anderson.lizardo@openbossa.org>2012-03-27 16:43:48 -0400
committerJohan Hedberg <johan.hedberg@intel.com>2012-03-30 13:23:27 +0300
commitc6fc73e1fac31b09a367414c64462d96123e4467 (patch)
tree2259a96a36fc967605d1ab087967c1b887ca4bc9 /attrib/client.c
parent14131675502b14fc83b59b12573c2e88ade1e467 (diff)
downloadbluez-c6fc73e1fac31b09a367414c64462d96123e4467.tar.gz
bluez-c6fc73e1fac31b09a367414c64462d96123e4467.tar.xz
bluez-c6fc73e1fac31b09a367414c64462d96123e4467.zip
attrib: Attempt to remove attio callback on watcher exit
When registering a watcher, it is attempted to add an attio callback. Therefore, when the watcher is unregistered or exits, this attio should be removed if there are no other users. This is already done when unregistering a watcher, it just missed when it exits without unregistering.
Diffstat (limited to 'attrib/client.c')
-rw-r--r--attrib/client.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/attrib/client.c b/attrib/client.c
index 1455c310..9efcec94 100644
--- a/attrib/client.c
+++ b/attrib/client.c
@@ -227,6 +227,7 @@ static void watcher_exit(DBusConnection *conn, void *user_data)
DBG("%s watcher %s exited", gatt->path, watcher->name);
gatt->watchers = g_slist_remove(gatt->watchers, watcher);
+ remove_attio(gatt);
}
static int characteristic_set_value(struct characteristic *chr,