diff options
author | Ben Chan <benchan@chromium.org> | 2013-09-26 11:07:16 -0700 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2013-09-26 20:23:51 +0200 |
commit | b5ef861d12c7533d89a18454b03e8e3301164bea (patch) | |
tree | d49cbf5d285f623de42879a271c0b388dba4a8b1 /src/mm-sim.c | |
parent | b786ac0debc7aa5e9a6b0f00bd61e15d9daea049 (diff) |
modem-helpers,sim: auto-detect if ICCID response is character swapped
This patch modifies mm_3gpp_parse_iccid() to auto-detect if an ICCID
response is character swapped or not by comparsing the major industry
identifier part of the ICCID response to the known value (89) for
telecommunication purposes. This addresses the issue where the same AT
command (e.g. AT^ICCID used by the huawei plugin) does not report ICCID
in a consistent format.
Diffstat (limited to 'src/mm-sim.c')
-rw-r--r-- | src/mm-sim.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mm-sim.c b/src/mm-sim.c index b2b011be..53235bc4 100644 --- a/src/mm-sim.c +++ b/src/mm-sim.c @@ -973,8 +973,7 @@ parse_iccid (const gchar *response, (sw1 == 0x91) || (sw1 == 0x92) || (sw1 == 0x9f)) { - /* +CRSM response must be character-swapped */ - return mm_3gpp_parse_iccid (buf, TRUE, error); + return mm_3gpp_parse_iccid (buf, error); } else { g_set_error (error, MM_CORE_ERROR, |