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 <jonathanx.gelie@intel.com>
This commit is contained in:
Jonathan Gelie 2017-02-08 10:11:41 +01:00 committed by Luiz Augusto von Dentz
commit 048a15bcc8
2 changed files with 2 additions and 0 deletions

View file

@ -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;
}

View file

@ -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;
}