Diff between cd97753ba5c5d12168419bf213794e76ec71d94f and 6f42c2c6f0543c7231229da7aef402657518f96b

Changed Files

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

Full Patch

diff --git a/src/shared/gatt-client.c b/src/shared/gatt-client.c
index a836773..e86c07f 100644
--- a/src/shared/gatt-client.c
+++ b/src/shared/gatt-client.c
@@ -2420,7 +2420,7 @@ bool bt_gatt_client_unregister_notify(struct bt_gatt_client *client,
 	if (!client || !id)
 		return false;
 
-	notify_data = queue_find(client->notify_list, match_notify_data_id,
+	notify_data = queue_remove_if(client->notify_list, match_notify_data_id,
 							UINT_TO_PTR(id));
 	if (!notify_data)
 		return false;
@@ -2428,7 +2428,6 @@ bool bt_gatt_client_unregister_notify(struct bt_gatt_client *client,
 	assert(notify_data->chrc->notify_count > 0);
 	assert(!notify_data->chrc->ccc_write_id);
 
-	queue_remove(client->notify_list, notify_data);
 	complete_unregister_notify(notify_data);
 	return true;
 }