[subcriber] Fix the subscriber use counting in gsm_04_08.c (Andreas Eversberg)
This patch will fix subscriber usage countinig. It may happen, that the subscriber count will not be 0 after releasing of a call. (This problem is solved with the application patch (27), which will replace static call transaction by a dynamic transaction list, and use subscriber for each transaction created.)
This commit is contained in:
parent
3e0ef7ccbe
commit
c21cfbc4aa
|
@ -851,6 +851,7 @@ static int gsm48_rx_mm_imsi_detach_ind(struct msgb *msg)
|
|||
GSM_SUBSCRIBER_UPDATE_DETACHED);
|
||||
DEBUGP(DMM, "Subscriber: %s\n",
|
||||
subscr->name ? subscr->name : subscr->imsi);
|
||||
subscr_put(subscr);
|
||||
} else
|
||||
DEBUGP(DMM, "Unknown Subscriber ?!?\n");
|
||||
|
||||
|
@ -935,11 +936,16 @@ 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)
|
||||
if (!msg->lchan->subscr) {
|
||||
msg->lchan->subscr = subscr;
|
||||
else if (msg->lchan->subscr != subscr) {
|
||||
} else if (msg->lchan->subscr != subscr) {
|
||||
DEBUGP(DRR, "<- Channel already owned by someone else?\n");
|
||||
subscr_put(subscr);
|
||||
return -EINVAL;
|
||||
} else {
|
||||
DEBUGP(DRR, "<- Channel already owned by us\n");
|
||||
subscr_put(subscr);
|
||||
subscr = msg->lchan->subscr;
|
||||
}
|
||||
|
||||
sig_data.subscr = subscr;
|
||||
|
|
Loading…
Reference in New Issue