From 489b0ff793be2aabaecdddbaca2b8e899887d496 Mon Sep 17 00:00:00 2001 From: Andrei Emeltchenko Date: Wed, 9 Mar 2016 17:11:17 +0200 Subject: [PATCH] Bluetooth/shell: Clear subscription on gatt_unsubscribe() Clear subscription allowing to test subscribe / unsubscribe in sequence. Change-Id: Ife8b994410107f05c23687e3fb23b4a81cad8ce7 Signed-off-by: Andrei Emeltchenko --- tests/bluetooth/shell/src/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/bluetooth/shell/src/main.c b/tests/bluetooth/shell/src/main.c index 325c30e7291..142c3ca0b88 100644 --- a/tests/bluetooth/shell/src/main.c +++ b/tests/bluetooth/shell/src/main.c @@ -1038,6 +1038,9 @@ static void cmd_gatt_unsubscribe(int argc, char *argv[]) } else { printk("Unsubscribe success\n"); } + + /* Clear subscribe_params to reuse it */ + memset(&subscribe_params, 0, sizeof(subscribe_params)); } static void auth_passkey_display(struct bt_conn *conn, unsigned int passkey)