summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2011-09-22 19:21:35 +0200
committerSylvain Munaut <tnt@246tNt.com>2011-11-13 20:25:19 +0100
commit1a2778e7d4b57e4c0297a850919afe2e73d4bfbb (patch)
tree7da400717a55023271c998b07eca32ee160b68c2
parent11b40286644c07ecef7b39378b1f73992c3da56e (diff)
host/mobile: Prevent the MM layer from making calls when not attached
If location updating (attachment) fails, the mobile returnes into idle state. Because the SIM may be valid in this location area, the mobile must check if the SIM is already attached. If not it may not change to normal service. Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
-rw-r--r--src/host/layer23/src/mobile/gsm48_mm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/host/layer23/src/mobile/gsm48_mm.c b/src/host/layer23/src/mobile/gsm48_mm.c
index ff936e3..cace17c 100644
--- a/src/host/layer23/src/mobile/gsm48_mm.c
+++ b/src/host/layer23/src/mobile/gsm48_mm.c
@@ -1117,8 +1117,9 @@ static int gsm48_mm_return_idle(struct osmocom_ms *ms, struct msgb *msg)
return 0;
}
- /* selected cell equals the registered LAI */
- if (subscr->lac /* valid */
+ /* if we are attached and selected cell equals the registered LAI */
+ if (subscr->imsi_attached
+ && subscr->lac /* valid */
&& cs->sel_mcc == subscr->mcc
&& cs->sel_mnc == subscr->mnc
&& cs->sel_lac == subscr->lac) {