[PATCH v2 BlueZ 7/8] attrib: Attempt to remove attio callback on watcher exit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
---
 attrib/client.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/attrib/client.c b/attrib/client.c
index 609f8b9..d5b2bc9 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,
-- 
1.7.5.4

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux