aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/silent_call.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@netfilter.org>2009-12-29 11:17:18 +0100
committerHarald Welte <laforge@netfilter.org>2010-01-01 10:59:19 +0100
commit83579ca8ff706cd2d5ed27a10fa90129bdd943f4 (patch)
treebe943b24ea38bbd4d6382b6651e6c95e0d373c2d /openbsc/src/silent_call.c
parentf31e4745bb32d120f55d8442669d666d88619fa0 (diff)
keep 'silent call' state in struct lchan
This enables us to reliably detect if a lchan is part of a silent call or not.
Diffstat (limited to 'openbsc/src/silent_call.c')
-rw-r--r--openbsc/src/silent_call.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/openbsc/src/silent_call.c b/openbsc/src/silent_call.c
index 82b656327..500d1873d 100644
--- a/openbsc/src/silent_call.c
+++ b/openbsc/src/silent_call.c
@@ -53,6 +53,7 @@ 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;
/* increment lchan reference count */
dispatch_signal(SS_SCALL, S_SCALL_SUCCESS, &sigdata);
use_lchan(lchan);
@@ -86,7 +87,10 @@ int gsm_silent_call_stop(struct gsm_subscriber *subscr)
if (!lchan)
return -EINVAL;
- /* FIXME: did we actually establish a silent call for this guy? */
+ /* did we actually establish a silent call for this guy? */
+ if (!lchan->silent_call)
+ return -EINVAL;
+
put_lchan(lchan);
return 0;