aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/bsc_vty.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-06-28 15:47:12 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-06-28 16:12:39 +0800
commit2412a07965ace5fc425b401438d21ff86ceeb2df (patch)
tree43f862deafccf9500b8f81621862a708b144f6c7 /openbsc/src/bsc_vty.c
parent94d625bfa09be748aa1a157da8320bd75761d431 (diff)
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.
Diffstat (limited to 'openbsc/src/bsc_vty.c')
-rw-r--r--openbsc/src/bsc_vty.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/openbsc/src/bsc_vty.c b/openbsc/src/bsc_vty.c
index 68a059749..321574504 100644
--- a/openbsc/src/bsc_vty.c
+++ b/openbsc/src/bsc_vty.c
@@ -700,16 +700,17 @@ static void lchan_dump_full_vty(struct vty *vty, struct gsm_lchan *lchan)
lchan->nr, lchan->ts->nr, lchan->ts->trx->nr,
lchan->ts->trx->bts->nr, gsm_lchant_name(lchan->type),
VTY_NEWLINE);
- vty_out(vty, " Use Count: %u, State: %s%s", lchan->conn.use_count,
+ vty_out(vty, " Use Count: %u, State: %s%s",
+ lchan->conn ? lchan->conn->use_count : -23,
gsm_lchans_name(lchan->state), VTY_NEWLINE);
vty_out(vty, " BS Power: %u dBm, MS Power: %u dBm%s",
lchan->ts->trx->nominal_power - lchan->ts->trx->max_power_red
- lchan->bs_power*2,
ms_pwr_dbm(lchan->ts->trx->bts->band, lchan->ms_power),
VTY_NEWLINE);
- if (lchan->conn.subscr) {
+ if (lchan->conn && lchan->conn->subscr) {
vty_out(vty, " Subscriber:%s", VTY_NEWLINE);
- subscr_dump_vty(vty, lchan->conn.subscr);
+ subscr_dump_vty(vty, lchan->conn->subscr);
} else
vty_out(vty, " No Subscriber%s", VTY_NEWLINE);
if (is_ipaccess_bts(lchan->ts->trx->bts)) {