From 17b340cc135df87fc9f62e27d018ef64f4c9629a Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Mon, 10 Jul 2017 14:26:28 +0300 Subject: [PATCH] Bluetooth: Shell: Implement support for gatt-metrics off With introduction of bt_gatt_service_unregister it is now possible to unregister service at runtime. Signed-off-by: Luiz Augusto von Dentz --- subsys/bluetooth/shell/gatt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subsys/bluetooth/shell/gatt.c b/subsys/bluetooth/shell/gatt.c index faff769f3f0..6f5bf478d47 100644 --- a/subsys/bluetooth/shell/gatt.c +++ b/subsys/bluetooth/shell/gatt.c @@ -713,8 +713,8 @@ int cmd_gatt_write_cmd_metrics(int argc, char *argv[]) registered = true; } } else if (!strcmp(argv[1], "off")) { - printk("Not supported.\n"); - err = -EINVAL; + printk("Unregistering GATT metrics test Service.\n"); + err = bt_gatt_service_unregister(&met_svc); } else { printk("Incorrect value: %s\n", argv[1]); return -EINVAL;