diff options
author | Denis Kenzior <denkenz@gmail.com> | 2012-02-23 23:14:08 -0600 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2012-02-27 20:28:42 -0600 |
commit | 876fb9e1b469ee15332a4e74ceb130bd75a6cc6c (patch) | |
tree | 7afb9bf193ace2af9f2c720bf5b4e806c80c3d38 /drivers/atmodem | |
parent | fb43a3274380a464dcceecba1d9d258f2bb21012 (diff) | |
download | ofono-876fb9e1b469ee15332a4e74ceb130bd75a6cc6c.tar.bz2 |
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.)
Diffstat (limited to 'drivers/atmodem')
-rw-r--r-- | drivers/atmodem/atutil.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/atmodem/atutil.c b/drivers/atmodem/atutil.c index b82ed20c..0c6aab46 100644 --- a/drivers/atmodem/atutil.c +++ b/drivers/atmodem/atutil.c @@ -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; |