From 93e795c1fdee782efa3856baf0abdc21fe3edc7f Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Mon, 11 Mar 2013 08:20:48 +0100 Subject: 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. [hfreyther: The code has not been moved to tch_frame_down but the issue looks similiar] --- openbsc/src/libmsc/gsm_04_08.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'openbsc/src/libmsc') diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index 02ffe580b..ff5d38d98 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -3005,6 +3005,10 @@ int mncc_tx_to_cc(struct gsm_network *net, int msg_type, void *arg) 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 -- cgit v1.2.3