projects
/
platform
/
upstream
/
ofono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dcf4ac5
)
Fix: Make next_hexstring handle optional quotes
author
Denis Kenzior
<denkenz@gmail.com>
Fri, 2 Oct 2009 23:22:44 +0000
(18:22 -0500)
committer
Denis Kenzior
<denkenz@gmail.com>
Fri, 2 Oct 2009 23:25:56 +0000
(18:25 -0500)
Ericsson MBM devices send CRSM information as hex strings, yet enclose
them in quotes which is not according to the standard.
gatchat/gatresult.c
patch
|
blob
|
history
diff --git
a/gatchat/gatresult.c
b/gatchat/gatresult.c
index
ee02c0c
..
1436ae3
100644
(file)
--- a/
gatchat/gatresult.c
+++ b/
gatchat/gatresult.c
@@
-228,6
+228,9
@@
gboolean g_at_result_iter_next_hexstring(GAtResultIter *iter,
goto out;
}
+ if (line[pos] == '"')
+ pos += 1;
+
end = pos;
while (end < len && g_ascii_isxdigit(line[end]))
@@
-241,6
+244,9
@@
gboolean g_at_result_iter_next_hexstring(GAtResultIter *iter,
for (; pos < end; pos += 2)
sscanf(line + pos, "%02hhx", bufpos++);
+ if (line[end] == '"')
+ end += 1;
+
out:
iter->line_pos = skip_to_next_field(line, end, len);