aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/silent_call.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-03-23 06:41:45 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-03-25 09:07:28 +0100
commit68884aa156126e30e435fe4e2c5847340c61f0d3 (patch)
tree7d963601663fc7be7afc49cef3021191377e0837 /openbsc/src/silent_call.c
parentfe6bf777c3f76f4dc5835411828c9ebbdd7db83e (diff)
lchan: Create a structure for MSC data of the lchan
Prepare to split the BSC and the MSC part by putting the MSC data for a connection into a "gsm_subscriber_connection" struct and renaming the macros.
Diffstat (limited to 'openbsc/src/silent_call.c')
-rw-r--r--openbsc/src/silent_call.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/openbsc/src/silent_call.c b/openbsc/src/silent_call.c
index cada24e66..8bd5341ec 100644
--- a/openbsc/src/silent_call.c
+++ b/openbsc/src/silent_call.c
@@ -38,6 +38,7 @@
static int paging_cb_silent(unsigned int hooknum, unsigned int event,
struct msgb *msg, void *_lchan, void *_data)
{
+ struct gsm_subscriber_connection *conn;
struct gsm_lchan *lchan = _lchan;
struct scall_signal_data sigdata;
int rc;
@@ -47,6 +48,8 @@ static int paging_cb_silent(unsigned int hooknum, unsigned int event,
DEBUGP(DSMS, "paging_cb_silent: ");
+ conn = &lchan->conn;
+
sigdata.lchan = lchan;
sigdata.data = _data;
@@ -54,10 +57,10 @@ static int paging_cb_silent(unsigned int hooknum, unsigned int event,
case GSM_PAGING_SUCCEEDED:
DEBUGPC(DSMS, "success, using Timeslot %u on ARFCN %u\n",
lchan->ts->nr, lchan->ts->trx->arfcn);
- lchan->silent_call = 1;
+ conn->silent_call = 1;
/* increment lchan reference count */
dispatch_signal(SS_SCALL, S_SCALL_SUCCESS, &sigdata);
- use_lchan(lchan);
+ use_subscr_con(conn);
break;
case GSM_PAGING_EXPIRED:
DEBUGP(DSMS, "expired\n");
@@ -97,7 +100,7 @@ int silent_call_reroute(struct msgb *msg)
int i;
/* if we're not part of a silent call, never reroute */
- if (!msg->lchan->silent_call)
+ if (!msg->lchan->conn.silent_call)
return 0;
/* check if we are a special message that is handled in openbsc */
@@ -126,16 +129,18 @@ int gsm_silent_call_start(struct gsm_subscriber *subscr, void *data, int type)
int gsm_silent_call_stop(struct gsm_subscriber *subscr)
{
struct gsm_lchan *lchan;
+ struct gsm_subscriber_connection *conn;
lchan = lchan_for_subscr(subscr);
if (!lchan)
return -EINVAL;
/* did we actually establish a silent call for this guy? */
- if (!lchan->silent_call)
+ conn = &lchan->conn;
+ if (!conn->silent_call)
return -EINVAL;
- put_lchan(lchan);
+ put_subscr_con(conn);
return 0;
}