client: Fix null output for ad service uuid 06/204906/1
authorERAMOTO Masaya <eramoto.masaya@jp.fujitsu.com>
Fri, 16 Feb 2018 05:51:03 +0000 (14:51 +0900)
committerAmit Purwar <amit.purwar@samsung.com>
Mon, 15 Apr 2019 03:28:20 +0000 (08:58 +0530)
If getting the advertise service information without setting, outputs
null as UUID as below:

  [bluetooth]# service
  UUID: ((null))

Change-Id: I47ce8f6c380b90bf17acfa0db112bfc93b234e14
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
client/advertising.c

index c9de177..1a6ffee 100644 (file)
@@ -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)