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:
f763bc0
)
gatttool: Fix handle parsing in cmd_char_write()
author
Andrzej Kaczmarek
<andrzej.kaczmarek@tieto.com>
Wed, 25 Apr 2012 15:25:19 +0000
(17:25 +0200)
committer
Johan Hedberg
<johan.hedberg@intel.com>
Thu, 26 Apr 2012 09:12:18 +0000
(12:12 +0300)
errno is not set to 0 before call to strtoll() so cmd_char_write() can fail
even with proper data. Use strtohandle() helper function instead.
attrib/interactive.c
patch
|
blob
|
history
diff --git
a/attrib/interactive.c
b/attrib/interactive.c
index
0064ba2
..
073e3f7
100644
(file)
--- a/
attrib/interactive.c
+++ b/
attrib/interactive.c
@@
-601,8
+601,8
@@
static void cmd_char_write(int argcp, char **argvp)
return;
}
- handle = strto
ll(argvp[1], NULL, 16
);
- if (
errno != 0 ||
handle <= 0) {
+ handle = strto
handle(argvp[1]
);
+ if (handle <= 0) {
printf("A valid handle is required\n");
return;
}