{ }
};
+static void remove_client(void *data)
+{
+ struct notify_client *ntfy_client = data;
+ struct btd_gatt_client *client = ntfy_client->chrc->service->client;
+
+ queue_remove(client->all_notify_clients, ntfy_client);
+
+ notify_client_unref(ntfy_client);
+}
+
#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
static const GDBusSignalTable service_signals[] = {
{ GDBUS_SIGNAL("GattServiceAdded",
/* List should be empty here */
queue_destroy(chrc->descs, NULL);
- queue_destroy(chrc->notify_clients, NULL);
if (chrc->write_io) {
queue_remove(chrc->service->client->ios, chrc->write_io->io);
sock_io_destroy(chrc->notify_io);
}
+ queue_destroy(chrc->notify_clients, remove_client);
+
g_free(chrc->path);
free(chrc);
}
return chrc;
}
-static void remove_client(void *data)
-{
- struct notify_client *ntfy_client = data;
- struct btd_gatt_client *client = ntfy_client->chrc->service->client;
-
- queue_remove(client->all_notify_clients, ntfy_client);
-
- notify_client_unref(ntfy_client);
-}
-
static void unregister_characteristic(void *data)
{
struct characteristic *chrc = data;
if (chrc->write_op)
bt_gatt_client_cancel(gatt, chrc->write_op->id);
- queue_remove_all(chrc->notify_clients, NULL, NULL, remove_client);
queue_remove_all(chrc->descs, NULL, NULL, unregister_descriptor);
g_dbus_unregister_interface(btd_get_dbus_connection(), chrc->path,