Hi Denis, Thanks for reviewing.
On Fri, Dec 3, 2010 at 5:22 AM, Denis Kenzior <[email protected]> wrote: >> /* 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. But if we jump to label 'out', this routine will return the wrong status code parsed from a unsolicited CREG/CGREG. For example, in my case, the real status value goes to the mode argument, and the status argument got lac value. Since huawei modems send these strings without quotes, I think we need different logic to parse these values, for example, we may need a new function for testing whether there are more codes left? > 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 ;) Yes, you got my point, I will propose another way to avoid this. Thanks. Best Regards, Tonny _______________________________________________ ofono mailing list [email protected] http://lists.ofono.org/listinfo/ofono
