aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gsm_04_11.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2009-07-23 19:21:02 +0200
committerHarald Welte <laforge@gnumonks.org>2009-07-23 19:21:02 +0200
commit761e944182255225bd2d48caa7d66a28ec7dea65 (patch)
treecc2ed755d1957f1d296ae0940aeadaef612dc6a8 /openbsc/src/gsm_04_11.c
parentb3c3faee940cda77afa9ba2500afa9ae9919851e (diff)
make sure subscr->net is always set
since a subscriber is an element of the gsm_network, we have to ensure subscr->net is always set correctly. We do this by using gsm_network as an argument to all functions that resolve or create a subscriber.
Diffstat (limited to 'openbsc/src/gsm_04_11.c')
-rw-r--r--openbsc/src/gsm_04_11.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/openbsc/src/gsm_04_11.c b/openbsc/src/gsm_04_11.c
index 1b622b12b..8db402b33 100644
--- a/openbsc/src/gsm_04_11.c
+++ b/openbsc/src/gsm_04_11.c
@@ -154,6 +154,7 @@ static int gsm340_rx_sms_submit(struct msgb *msg, struct sms_submit *sms,
/* process an incoming TPDU (called from RP-DATA) */
static int gsm340_rx_tpdu(struct msgb *msg)
{
+ struct gsm_bts *bts = msg->lchan->ts->trx->bts;
u_int8_t *smsp = msgb_sms(msg);
struct sms_submit *sms;
struct gsm_sms *gsms;
@@ -257,7 +258,7 @@ static int gsm340_rx_tpdu(struct msgb *msg)
/* FIXME: sender refcount */
/* determine gsms->receiver based on dialled number */
- gsms->receiver = subscr_get_by_extension(sms->dest_addr);
+ gsms->receiver = subscr_get_by_extension(bts->network, sms->dest_addr);
if (!gsms->receiver) {
rc = 1; /* cause 1: unknown subscriber */
goto out;