[PATCH BlueZ 5/7] tools/btgatt-client: Print prompt on service changed.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 ea9acb7..5eedfd0 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.1.0.rc2.206.gedb03e5

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux