aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-12-27 16:02:25 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-01-06 14:52:51 +0100
commitb56a6bbc55a17d7a31ab65ff334edaaf38d30260 (patch)
treec78c1c7858709747abdc4482ea094d0ece84af03
parent50c5ff7b946e5af91cdb678b3ff6eed9832467d1 (diff)
mncc: bts can be NULL, attempt to find the bts from the transaction
Follow trans->conn->lchan to the BTS instead of using the BTS that is guranteed to be NULL in the codepath we have entered here. The trans->conn should still be there, and the lchan should be valid as well as we have reordered the clear statements.
-rw-r--r--openbsc/src/gsm_04_08.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsc/src/gsm_04_08.c b/openbsc/src/gsm_04_08.c
index d1789aa52..df24d2f02 100644
--- a/openbsc/src/gsm_04_08.c
+++ b/openbsc/src/gsm_04_08.c
@@ -2921,7 +2921,7 @@ int mncc_tx_to_cc(struct gsm_network *net, int msg_type, void *arg)
int i, rc = 0;
struct gsm_trans *trans = NULL, *transt;
struct gsm_subscriber_connection *conn = NULL;
- struct gsm_bts *bts;
+ struct gsm_bts *bts = NULL;
struct gsm_mncc *data = arg, rel;
DEBUGP(DMNCC, "receive message %s\n", get_mncc_name(msg_type));