summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrzej Zaborowski <andrew.zaborowski@intel.com>2009-07-18 01:42:31 +0200
committerDenis Kenzior <denkenz@gmail.com>2009-07-17 23:48:28 -0500
commit983d16ca37a7bd2840f2794deed629478276cc6d (patch)
tree329cf8e58894466a438593a952570f2a3be8575f
parent8469412e7b3f8384631a398cf2228091439e30cd (diff)
downloadofono-983d16ca37a7bd2840f2794deed629478276cc6d.tar.bz2
Make PNN / OPL work.
-rw-r--r--src/network.c4
-rw-r--r--src/simutil.c12
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;