Diff between 822037fe74503fe87c3dc0b11dc69f2e9efa2376 and 476ae809a27ef2a3e3cf4f448ea3e50dbaca41f3

Changed Files

File Additions Deletions Status
src/gatt-client.c +7 -2 modified

Full Patch

diff --git a/src/gatt-client.c b/src/gatt-client.c
index 3c31a42..65308c0 100644
--- a/src/gatt-client.c
+++ b/src/gatt-client.c
@@ -1539,8 +1539,13 @@ static void register_notify_io_cb(uint16_t att_ecode, void *user_data)
 	struct bt_gatt_client *gatt = chrc->service->client->gatt;
 
 	if (att_ecode) {
-		queue_remove(chrc->notify_clients, client);
-		notify_client_free(client);
+		DBusMessage *reply =
+			create_gatt_dbus_error(chrc->notify_io->msg, att_ecode);
+
+		g_dbus_send_message(btd_get_dbus_connection(), reply);
+		dbus_message_unref(chrc->notify_io->msg);
+		chrc->notify_io->msg = NULL;
+		destroy_sock(chrc, chrc->notify_io->io);
 		return;
 	}