[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.
This commit is contained in:
Holger Freyther 2009-02-14 23:53:15 +00:00
parent 531c0deecb
commit 2fa4cb5bc9
1 changed files with 7 additions and 7 deletions

View File

@ -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 */