From 574c53b3ecae9c446f0ac514d5d210288bc8606c Mon Sep 17 00:00:00 2001 From: Arman Uguray Date: Mon, 27 Oct 2014 07:35:40 -0700 Subject: [PATCH] tools/btgatt-client: Print prompt on service changed. The service changed handler now prints the command line prompt if the changed service list empty. --- tools/btgatt-client.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/btgatt-client.c b/tools/btgatt-client.c index ea9acb77e..5eedfd0a8 100644 --- a/tools/btgatt-client.c +++ b/tools/btgatt-client.c @@ -304,8 +304,11 @@ static void service_changed_cb(uint16_t start_handle, uint16_t end_handle, printf("\nService Changed handled - start: 0x%04x end: 0x%04x\n", start_handle, end_handle); - if (!bt_gatt_service_iter_next_by_handle(&iter, start_handle, &service)) + if (!bt_gatt_service_iter_next_by_handle(&iter, start_handle, + &service)) { + print_prompt(); return; + } print_service(service); -- 2.47.3