diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/network.c | 4 | ||||
-rw-r--r-- | src/simutil.c | 12 |
2 files changed, 10 insertions, 6 deletions
diff --git a/src/network.c b/src/network.c index 56ca924d..969c6376 100644 --- a/src/network.c +++ b/src/network.c @@ -1206,12 +1206,12 @@ static void sim_opl_read_cb(struct ofono_modem *modem, int ok, if (structure != OFONO_SIM_FILE_STRUCTURE_FIXED) return; - if (length < 8 || record_length < 8 || length < record_length) + if (record_length < 8 || length < record_length) return; total = length / record_length; - sim_eons_add_pnn_record(netreg->eons, record, data, record_length); + sim_eons_add_opl_record(netreg->eons, data, record_length); if (record != total) return; diff --git a/src/simutil.c b/src/simutil.c index 16fad16c..26d1bade 100644 --- a/src/simutil.c +++ b/src/simutil.c @@ -338,13 +338,17 @@ static struct sim_eons_operator_info * for (i = 0; i < OFONO_MAX_MCC_LENGTH; i++) if (mcc[i] != opl->mcc[i] && - !(opl->mcc[i] == 'd' && mcc[i])) - continue; + !(opl->mcc[i] == 'b' && mcc[i])) + break; + if (i < OFONO_MAX_MCC_LENGTH) + continue; for (i = 0; i < OFONO_MAX_MNC_LENGTH; i++) if (mnc[i] != opl->mnc[i] && - !(opl->mnc[i] == 'd' && mnc[i])) - continue; + !(opl->mnc[i] == 'b' && mnc[i])) + break; + if (i < OFONO_MAX_MNC_LENGTH) + continue; if (opl->lac_tac_low == 0 && opl->lac_tac_high == 0xfffe) break; |