summaryrefslogtreecommitdiff
path: root/src/gatt-client.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gatt-client.c')
-rw-r--r--src/gatt-client.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gatt-client.c b/src/gatt-client.c
index 8341a310..977926af 100644
--- a/src/gatt-client.c
+++ b/src/gatt-client.c
@@ -1734,6 +1734,12 @@ static DBusMessage *characteristic_acquire_notify(DBusConnection *conn,
if (!client)
return btd_error_failed(msg, "Failed allocate notify session");
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ chrc->notify_io = new0(struct sock_io, 1);
+ chrc->notify_io->data = client;
+ chrc->notify_io->msg = dbus_message_ref(msg);
+ chrc->notify_io->destroy = notify_io_destroy;
+#endif
client->notify_id = bt_gatt_client_register_notify(gatt,
chrc->value_handle,
register_notify_io_cb,
@@ -1741,6 +1747,11 @@ static DBusMessage *characteristic_acquire_notify(DBusConnection *conn,
client, NULL);
if (!client->notify_id) {
notify_client_unref(client);
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ dbus_message_unref(chrc->notify_io->msg);
+ g_free(chrc->notify_io);
+ chrc->notify_io = NULL;
+#endif
return btd_error_failed(msg, "Failed to subscribe");
}
@@ -1750,10 +1761,12 @@ static DBusMessage *characteristic_acquire_notify(DBusConnection *conn,
DBG("Added client to notify_clients. length: %d", queue_length(chrc->notify_clients));
#endif
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
chrc->notify_io = new0(struct sock_io, 1);
chrc->notify_io->data = client;
chrc->notify_io->msg = dbus_message_ref(msg);
chrc->notify_io->destroy = notify_io_destroy;
+#endif
return NULL;
}