aboutsummaryrefslogtreecommitdiff
path: root/introspection
diff options
context:
space:
mode:
authorBen Chan <benchan@chromium.org>2013-07-31 23:07:52 -0700
committerDan Williams <dcbw@redhat.com>2013-08-06 16:14:35 -0500
commitffac6f17b5912dfa4d2e55eaf078796680871ea7 (patch)
tree4b08910ca479095e00ffa417d8bca1de18f0e776 /introspection
parent755c61a2ffad6d54fc3116dd29d91b4325cf6b18 (diff)
modem-helpers: fix parsing of CREG/CGREG/CEREG responses
The format of CREG/CGREG/CEREG responses is not very precisely defined in or strictly enforced by the 3GPP specifications. That leads to the fact that some modems put leading zeros in integer type fields (e.g. <n>, <stat>, <AcT>), and not all modems put double quotes around string type fields (e.g. <lac>, <ci>) in those C*REG responses. For example, 0001 can be a valid value for both <stat> and <lac>. The original C*REG parsing code in ModemManager could potentially interpret '+CREG: <stat>,<lac>,<ci>,<AcT>' as '+CREG: <n>,<stat>,<lac>,<ci>'. This patch addresses this issue by refining the regular expressions returned by mm_3gpp_creg_regex_get() with the following assumptions: 1. If a modem puts leading zeros in integer type fields, it puts double quotes around string type fields. 2. If a modem omits double quotes around string type fields, it does not put leading zeros in integer type fields.
Diffstat (limited to 'introspection')
0 files changed, 0 insertions, 0 deletions