summaryrefslogtreecommitdiffstats
path: root/gatchat/gatresult.c
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2009-10-02 18:22:44 -0500
committerDenis Kenzior <denkenz@gmail.com>2009-10-02 18:25:56 -0500
commit7e82686e70157b16878e97b0c3c1174c3e2b96c8 (patch)
tree66832b966389a29346b03045594e53e21c4d3236 /gatchat/gatresult.c
parentdcf4ac50b3fc35c75431b2ebf3700c8bd1051dbc (diff)
downloadofono-7e82686e70157b16878e97b0c3c1174c3e2b96c8.tar.bz2
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);