From 048a15bcc8721d2b0d3d943969e8788fe3d05454 Mon Sep 17 00:00:00 2001 From: Jonathan Gelie Date: Wed, 8 Feb 2017 10:11:41 +0100 Subject: [PATCH] Bluetooth: GATT: fixing unsubscription If subcription was found within the subscription list, we have check if remains identical subscription from the next node. Otherwise none unsubscription is realized. Change-Id: I38132d7c80575801885b8057902f3d4666b08aea Signed-off-by: Jonathan Gelie --- drivers/bluetooth/nble/gatt.c | 1 + subsys/bluetooth/host/gatt.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/bluetooth/nble/gatt.c b/drivers/bluetooth/nble/gatt.c index c06898ab299..1df440828b5 100644 --- a/drivers/bluetooth/nble/gatt.c +++ b/drivers/bluetooth/nble/gatt.c @@ -1369,6 +1369,7 @@ int bt_gatt_unsubscribe(struct bt_conn *conn, if (params == tmp) { found = params; sys_slist_remove(&subscriptions, prev, node); + continue; } else { prev = node; } diff --git a/subsys/bluetooth/host/gatt.c b/subsys/bluetooth/host/gatt.c index 58c909d0521..643c6a31d1f 100644 --- a/subsys/bluetooth/host/gatt.c +++ b/subsys/bluetooth/host/gatt.c @@ -1779,6 +1779,7 @@ int bt_gatt_unsubscribe(struct bt_conn *conn, if (params == tmp) { found = true; sys_slist_remove(&subscriptions, prev, node); + continue; } else { prev = node; }