From 5e0b0a658fdc8d42de434eb1939352c55eeed30f Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Mon, 9 May 2016 22:33:01 +0200 Subject: [PATCH] mscsplit: add gsm_network backpointer to gsm_subscriber_connection We want to be able to use a network backpointer without having to go through a gsm_bts struct. This commit adds the network pointer, the subsequent commit applies direct access to the network structure from gsm_subscriber_connection. Change-Id: If8870972f1b3e333c2a4cce97cdc95bdee0382a1 --- openbsc/include/openbsc/gsm_data.h | 2 ++ openbsc/src/libbsc/bsc_api.c | 1 + 2 files changed, 3 insertions(+) diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index 26efeaa3a..ffb7dd226 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -134,6 +134,8 @@ struct gsm_subscriber_connection { struct osmo_bsc_sccp_con *sccp_con; /* back pointers */ + struct gsm_network *network; + int in_release; struct gsm_lchan *lchan; struct gsm_lchan *ho_lchan; diff --git a/openbsc/src/libbsc/bsc_api.c b/openbsc/src/libbsc/bsc_api.c index f42598a7b..02751f493 100644 --- a/openbsc/src/libbsc/bsc_api.c +++ b/openbsc/src/libbsc/bsc_api.c @@ -247,6 +247,7 @@ struct gsm_subscriber_connection *subscr_con_allocate(struct gsm_lchan *lchan) if (!conn) return NULL; + conn->network = net; conn->lchan = lchan; conn->bts = lchan->ts->trx->bts; lchan->conn = conn;