aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/bsc_msc_ip.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/src/bsc_msc_ip.c')
-rw-r--r--openbsc/src/bsc_msc_ip.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/openbsc/src/bsc_msc_ip.c b/openbsc/src/bsc_msc_ip.c
index 5976a0292..9412627a2 100644
--- a/openbsc/src/bsc_msc_ip.c
+++ b/openbsc/src/bsc_msc_ip.c
@@ -297,6 +297,11 @@ static int handle_cipher_m_complete(struct msgb *msg)
{
struct msgb *resp;
+ if (!msg->lchan->msc_data) {
+ LOGP(DMSC, LOGL_ERROR, "No MSC data for CIPHER MODE COMPLETE.\n");
+ return -1;
+ }
+
DEBUGP(DMSC, "CIPHER MODE COMPLETE from MS, forwarding to MSC\n");
resp = bssmap_create_cipher_complete(msg);
if (!resp) {
@@ -320,7 +325,7 @@ static int handle_ass_compl(struct msgb *msg)
DEBUGP(DMSC, "ASSIGNMENT COMPLETE from MS, forwarding to MSC\n");
if (!msg->lchan->msc_data) {
- DEBUGP(DMSC, "No MSC data\n");
+ LOGP(DMSC, LOGL_ERROR, "No MSC data\n");
put_lchan(msg->lchan, 0);
return -1;
}
@@ -367,7 +372,7 @@ static int handle_ass_fail(struct msgb *msg)
DEBUGP(DMSC, "ASSIGNMENT FAILURE from MS, forwarding to MSC\n");
if (!msg->lchan->msc_data) {
- DEBUGP(DMSC, "No MSC data\n");
+ LOGP(DMSC, LOGL_ERROR, "No MSC data\n");
put_lchan(msg->lchan, 0);
return -1;
}
@@ -398,6 +403,11 @@ static int handle_modify_ack(struct msgb *msg)
{
int rc;
+ if (!msg->lchan->msc_data) {
+ LOGP(DMSC, LOGL_ERROR, "No MSC data for modify ack.\n");
+ return -1;
+ }
+
/* modify RSL */
rc = gsm48_rx_rr_modif_ack(msg);
if (rc < 0)