Hi Tonny,
On 12/02/2010 08:23 AM, Tonny Tzeng wrote:
This patch skip unsolicited CREG/CGREG correctly.
Signed-off-by: Tonny Tzeng <tonny.tzeng(a)gmail.com>
Please don't use Signed-off-by
---
drivers/atmodem/atutil.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/atmodem/atutil.c b/drivers/atmodem/atutil.c
index b6f0d92..2ca7b44 100644
--- a/drivers/atmodem/atutil.c
+++ b/drivers/atmodem/atutil.c
@@ -244,8 +244,9 @@ gboolean at_util_parse_reg(GAtResult *result, const
char *prefix,
continue;
/* Some firmware will report bogus lac/ci when unregistered */
+ /* in this case, we should skip it */
if (s != 1 && s != 5)
- goto out;
+ continue;
And this fix is wrong. what this is doing is skipping the parsing of
the lac/ci values if we're not registered / roaming. Using continue
here will cause the parser to fail for those cases.
What you probably meant was continuing if the status was not between 1
and 5. But even that won't really help you if an lac of 1..5 is
encountered ;)
switch (vendor) {
case OFONO_VENDOR_HUAWEI:
Regards,
-Denis