summaryrefslogtreecommitdiffstats
path: root/src/host
diff options
context:
space:
mode:
authorAndreas.Eversberg <jolly@eversberg.eu>2010-10-20 18:16:12 +0000
committerAndreas.Eversberg <jolly@eversberg.eu>2010-10-20 18:16:12 +0000
commit18c621e9f7d7455842894db7682c022303555c85 (patch)
treeb4c124fc7a553f31f761aabe925695b3ca82b485 /src/host
parent8be9f76bc414ddfccb91c2a4e6e93445cefea20f (diff)
[layer23] Don't request a channel, if SYSINFO 3 is not available
SI3 is required in order to request a channel the correct way. If not yet received, the process crashes due to an arithmetic exception.
Diffstat (limited to 'src/host')
-rw-r--r--src/host/layer23/src/mobile/gsm48_rr.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/host/layer23/src/mobile/gsm48_rr.c b/src/host/layer23/src/mobile/gsm48_rr.c
index ffabde94..78c99310 100644
--- a/src/host/layer23/src/mobile/gsm48_rr.c
+++ b/src/host/layer23/src/mobile/gsm48_rr.c
@@ -1451,7 +1451,7 @@ int gsm48_rr_tx_rand_acc(struct osmocom_ms *ms, struct msgb *msg)
if (cs->ccch_state != GSM322_CCCH_ST_DATA) {
LOGP(DRR, LOGL_INFO, "CCCH channel activation failed.\n");
-
+fail:
if (rr->rr_est_req) {
struct msgb *msg =
gsm48_rr_msgb_alloc(GSM48_RR_REL_IND);
@@ -1470,6 +1470,11 @@ int gsm48_rr_tx_rand_acc(struct osmocom_ms *ms, struct msgb *msg)
return 0;
}
+ if (!s || !s->si3 || !s->tx_integer) {
+ LOGP(DRR, LOGL_NOTICE, "Not enough SYSINFO\n");
+ goto fail;
+ }
+
if (rr->state == GSM48_RR_ST_IDLE) {
LOGP(DRR, LOGL_INFO, "MM already released RR.\n");