diff options
author | Holger Freyther <zecke@selfish.org> | 2009-02-14 23:53:15 +0000 |
---|---|---|
committer | Holger Freyther <zecke@selfish.org> | 2009-02-14 23:53:15 +0000 |
commit | 2fa4cb5bc9828be804662487d179488663aa4abe (patch) | |
tree | 2b1c51d1fd6f3b48b3de63148fe20a4be1a935c6 | |
parent | 531c0deecb4c9d4c3e7b823b7198bebcb67218a6 (diff) |
[paging] Assign the subscriber to the channel first...
Assign the GSM subscriber to the lchan and then inform
the paging layer and dispatch a signal. This makes sure
that lchan is updated with the right kind of information.
-rw-r--r-- | src/gsm_04_08.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gsm_04_08.c b/src/gsm_04_08.c index 4d77d5dd8..0d889fb93 100644 --- a/src/gsm_04_08.c +++ b/src/gsm_04_08.c @@ -700,6 +700,13 @@ static int gsm48_rr_rx_pag_resp(struct msgb *msg) DEBUGP(DRR, "<- Channel was requested by %s\n", subscr->name ? subscr->name : subscr->imsi); + if (!msg->lchan->subscr) + msg->lchan->subscr = subscr; + else if (msg->lchan->subscr != subscr) { + DEBUGP(DRR, "<- Channel already owned by someone else?\n"); + subscr_put(subscr); + } + struct paging_signal_data sig_data = { .data = { .area = S_PAGING, @@ -711,13 +718,6 @@ static int gsm48_rr_rx_pag_resp(struct msgb *msg) dispatch_signal(&sig_data.data); paging_request_stop(msg->trx->bts, subscr); - if (!msg->lchan->subscr) - msg->lchan->subscr = subscr; - else if (msg->lchan->subscr != subscr) { - DEBUGP(DRR, "<- Channel already owned by someone else?\n"); - subscr_put(subscr); - } - /* FIXME: somehow signal the completion of the PAGING to * the entity that requested the paging */ |