mirror of git://git.sysmocom.de/ofono
atutil: Ignore invalid CLCC results
Some phones report CLCC calls with out-of-range info. E.g. call index being 0 (it is 1 based according to 27.007) and call states being reported as '6' (valid call states are 0-5.)
This commit is contained in:
parent
fb43a32743
commit
876fb9e1b4
|
@ -131,12 +131,18 @@ GSList *at_util_parse_clcc(GAtResult *result)
|
|||
if (!g_at_result_iter_next_number(&iter, &id))
|
||||
continue;
|
||||
|
||||
if (id == 0)
|
||||
continue;
|
||||
|
||||
if (!g_at_result_iter_next_number(&iter, &dir))
|
||||
continue;
|
||||
|
||||
if (!g_at_result_iter_next_number(&iter, &status))
|
||||
continue;
|
||||
|
||||
if (status > 5)
|
||||
continue;
|
||||
|
||||
if (!g_at_result_iter_next_number(&iter, &type))
|
||||
continue;
|
||||
|
||||
|
|
Loading…
Reference in New Issue