summaryrefslogtreecommitdiff
path: root/gatchat/gatresult.c
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2009-10-02 18:22:44 -0500
committerMarcel Holtmann <marcel@holtmann.org>2009-10-03 04:35:04 +0200
commit366580543a60df279667b9447117ee61e50f8be9 (patch)
tree01eaabf57d8a635c05f74244ded9c5f574bf1884 /gatchat/gatresult.c
parent1a8243983b41a3a4bed110ffeab80b5f2c091862 (diff)
downloadconnman-366580543a60df279667b9447117ee61e50f8be9.tar.gz
connman-366580543a60df279667b9447117ee61e50f8be9.tar.bz2
connman-366580543a60df279667b9447117ee61e50f8be9.zip
Fix: Make next_hexstring handle optional quotes
Ericsson MBM devices send CRSM information as hex strings, yet enclose them in quotes which is not according to the standard.
Diffstat (limited to 'gatchat/gatresult.c')
-rw-r--r--gatchat/gatresult.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gatchat/gatresult.c b/gatchat/gatresult.c
index ee02c0ca..1436ae30 100644
--- 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);