OSDN Git Service
(root)
/
android-x86
/
external-bluetooth-bluez.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
165803d
)
gatttool: Show info message when no primary service is found
author
Eder Ruiz Maria
<eder.ruiz@openbossa.org>
Tue, 2 Apr 2013 23:31:29 +0000
(19:31 -0400)
committer
Johan Hedberg
<johan.hedberg@intel.com>
Wed, 17 Apr 2013 08:23:50 +0000
(11:23 +0300)
attrib/interactive.c
patch
|
blob
|
history
diff --git
a/attrib/interactive.c
b/attrib/interactive.c
index
9b16ddf
..
1d31889
100644
(file)
--- a/
attrib/interactive.c
+++ b/
attrib/interactive.c
@@
-190,6
+190,11
@@
static void primary_all_cb(GSList *services, guint8 status, gpointer user_data)
return;
}
+ if (services == NULL) {
+ rl_printf("No primary service found\n");
+ return;
+ }
+
for (l = services; l; l = l->next) {
struct gatt_primary *prim = l->data;
rl_printf("attr handle: 0x%04x, end grp handle: 0x%04x uuid: %s\n",
@@
-208,6
+213,11
@@
static void primary_by_uuid_cb(GSList *ranges, guint8 status,
return;
}
+ if (ranges == NULL) {
+ rl_printf("No service UUID found\n");
+ return;
+ }
+
for (l = ranges; l; l = l->next) {
struct att_range *range = l->data;
rl_printf("Starting handle: 0x%04x Ending handle: 0x%04x\n",