if (att_ecode) {
queue_remove(chrc->notify_clients, client);
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ sock_io_destroy(chrc->notify_io);
+ chrc->notify_io = NULL;
+#endif
notify_client_free(client);
return;
}
{
struct notify_client *client = data;
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ if (!client || !client->chrc)
+ return;
+#endif
+
if (queue_remove(client->chrc->notify_clients, client))
notify_client_unref(client);
}
struct notify_client *client;
struct btd_device *device = chrc->service->client->device;
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ if (device_get_gatt_connected(device) == FALSE) {
+ error("GATT not connected");
+ return btd_error_not_connected(msg);
+ }
+#endif
+
if (device_is_disconnecting(device)) {
error("Device is disconnecting. StartNotify is not allowed.");
return btd_error_not_connected(msg);
g_free(chrc->path);
free(chrc);
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ chrc = NULL;
+#endif
}
static void att_exchange(uint16_t mtu, void *user_data)