From 2412a07965ace5fc425b401438d21ff86ceeb2df Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 28 Jun 2010 15:47:12 +0800 Subject: bsc_api: Allocate the subscriber_connection dynamically This is a big change to the way we use the subscriber connection. From now on it is is dynamically allocated and we will slowly move from a 1:1 lchan to conn to having more than one lchan per connection. This is the first commit, the subscr_con* methods will move to gsm_data once the use_count is removed from the connection, the freeing of the connection will also change. --- openbsc/src/abis_rsl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'openbsc/src/abis_rsl.c') diff --git a/openbsc/src/abis_rsl.c b/openbsc/src/abis_rsl.c index 6c6230f5a..f5ebb771a 100644 --- a/openbsc/src/abis_rsl.c +++ b/openbsc/src/abis_rsl.c @@ -123,7 +123,8 @@ struct gsm_lchan *lchan_lookup(struct gsm_bts_trx *trx, u_int8_t chan_nr) lchan = &ts->lchan[lch_idx]; log_set_context(BSC_CTX_LCHAN, lchan); - log_set_context(BSC_CTX_SUBSCR, lchan->conn.subscr); + if (lchan->conn) + log_set_context(BSC_CTX_SUBSCR, lchan->conn->subscr); return lchan; } -- cgit v1.2.3