aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2013-03-11 08:20:48 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2014-03-13 08:08:38 +0100
commitb01c271f4d478787448e5e271e2b2a72e040127d (patch)
tree0f0947d3d83237d14ae35addfd978c0ad541e4d1
parent2949d1dd88f6a0d06fdb5dc798a4526429ed4862 (diff)
Add check for non existing lchan at tch_frame_down()
Traffic cannot sent to BTS, if there is (currently) no logical channel associated with the transaction. This happens, if TCH traffic is received from upper layer, but there is no lchan available before completing immediate assignment, handover or assignment process.
-rw-r--r--openbsc/src/libmsc/gsm_04_08.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c
index 663d855d0..6a9404e9c 100644
--- a/openbsc/src/libmsc/gsm_04_08.c
+++ b/openbsc/src/libmsc/gsm_04_08.c
@@ -1834,6 +1834,10 @@ int tch_frame_down(struct gsm_network *net, uint32_t callref, struct gsm_data_fr
LOGP(DMNCC, LOGL_NOTICE, "TCH frame for trans without conn\n");
return 0;
}
+ if (!trans->conn->lchan) {
+ LOGP(DMNCC, LOGL_NOTICE, "TCH frame for trans without lchan\n");
+ return 0;
+ }
if (trans->conn->lchan->type != GSM_LCHAN_TCH_F
&& trans->conn->lchan->type != GSM_LCHAN_TCH_H) {
/* This should be LOGL_ERROR or NOTICE, but