diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2011-09-22 19:21:35 +0200 |
---|---|---|
committer | Sylvain Munaut <tnt@246tNt.com> | 2011-11-13 20:25:19 +0100 |
commit | 1a2778e7d4b57e4c0297a850919afe2e73d4bfbb (patch) | |
tree | 7da400717a55023271c998b07eca32ee160b68c2 /src/host/layer23 | |
parent | 11b40286644c07ecef7b39378b1f73992c3da56e (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>
Diffstat (limited to 'src/host/layer23')
-rw-r--r-- | src/host/layer23/src/mobile/gsm48_mm.c | 5 |
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 ff936e35..cace17cf 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) { |