diff options
author | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2016-12-29 19:50:03 +0100 |
---|---|---|
committer | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2016-12-29 19:50:03 +0100 |
commit | 6fa066836fa6fd4164244337d1facee369a074fd (patch) | |
tree | 76f32e43c36ae750a0d8f9e52586264d836b17f3 | |
parent | 8fc4ebed2b2fd094f09f329fd284b4ce916271c7 (diff) | |
download | hardware_ril_samsung-ril-6fa066836fa6fd4164244337d1facee369a074fd.zip hardware_ril_samsung-ril-6fa066836fa6fd4164244337d1facee369a074fd.tar.gz hardware_ril_samsung-ril-6fa066836fa6fd4164244337d1facee369a074fd.tar.bz2 |
network: Account for three-digit MNC codes
Makes the OPERATOR request work in countries that use three-digit MNC
codes.
Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
-rw-r--r-- | network.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -285,7 +285,10 @@ int ipc2ril_net_operator(char *data, size_t size, char **plmn, *operator_long = NULL; *operator_short = NULL; - rc = sscanf((char *) &buffer, "%3u%2u", &mcc, &mnc); + if (buffer[5] == '\0') + rc = sscanf((char *) &buffer, "%3u%2u", &mcc, &mnc); + else + rc = sscanf((char *) &buffer, "%3u%3u", &mcc, &mnc); if (rc < 2) goto error; |