[PATCH BlueZ 1/7] client: Fix null output for ad service uuid

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

 



If getting the advertise service information without setting, outputs
null as UUID as below:

  [bluetooth]# service
  UUID: ((null))
---
 client/advertising.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/client/advertising.c b/client/advertising.c
index b9b9a7371..80a48652c 100644
--- a/client/advertising.c
+++ b/client/advertising.c
@@ -131,7 +131,7 @@ static void print_uuid(const char *uuid)
 
 		bt_shell_printf("UUID: %s(%s)\n", str, uuid);
 	} else
-		bt_shell_printf("UUID: (%s)\n", uuid);
+		bt_shell_printf("UUID: (%s)\n", uuid ? uuid : "");
 }
 
 static void print_ad_uuids(void)
-- 
2.14.1

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