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 <luiz.von.dentz@intel.com>
This commit is contained in:
Luiz Augusto von Dentz 2017-07-10 14:26:28 +03:00 committed by Johan Hedberg
commit 17b340cc13

View file

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