mirror of git://git.sysmocom.de/ofono
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.
This commit is contained in:
parent
dcf4ac50b3
commit
7e82686e70
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue