msc: Attempt to release the lchan immediately on IMSI Detach

The Nokia E71 sends a "IMSI Detach" this msc code does not immediately
send the "RR Channel Release", the E71 is impatient and sends a DISC,
the "RELEASE INDICATION" is handled by starting the channel release
procedure. OpenBSC sends a "RR Channel Release" which will never be
answered, during the early release there is no timer and the lchan will
be in "RELEASE REQUESTED" forever.

This commit removes the anchor operation and checks if the channel can
be released immediately. Regarding the channel release handling there
is already a branch that needs to be tested.
This commit is contained in:
Holger Hans Peter Freyther 2012-07-10 08:53:27 +02:00
parent 8c00496e42
commit 153b13b02e
1 changed files with 6 additions and 6 deletions

View File

@ -916,10 +916,9 @@ static int gsm48_rx_mm_serv_req(struct gsm_subscriber_connection *conn, struct m
_gsm48_rx_mm_serv_req_sec_cb, NULL);
}
static int gsm48_rx_mm_imsi_detach_ind(struct msgb *msg)
static int gsm48_rx_mm_imsi_detach_ind(struct gsm_subscriber_connection *conn, struct msgb *msg)
{
struct e1inp_sign_link *sign_link = msg->lchan->ts->trx->rsl_link;
struct gsm_bts *bts = msg->lchan->ts->trx->bts;
struct gsm_bts *bts = conn->bts;
struct gsm48_hdr *gh = msgb_l3(msg);
struct gsm48_imsi_detach_ind *idi =
(struct gsm48_imsi_detach_ind *) gh->data;
@ -952,7 +951,7 @@ static int gsm48_rx_mm_imsi_detach_ind(struct msgb *msg)
}
if (subscr) {
subscr_update(subscr, sign_link->trx->bts,
subscr_update(subscr, bts,
GSM_SUBSCRIBER_UPDATE_DETACHED);
DEBUGP(DMM, "Subscriber: %s\n", subscr_name(subscr));
@ -966,7 +965,8 @@ static int gsm48_rx_mm_imsi_detach_ind(struct msgb *msg)
/* FIXME: iterate over all transactions and release them,
* imagine an IMSI DETACH happening during an active call! */
/* subscriber is detached: should we release lchan? */
release_anchor(conn);
msc_release_connection(conn);
return 0;
}
@ -1047,7 +1047,7 @@ static int gsm0408_rcv_mm(struct gsm_subscriber_connection *conn, struct msgb *m
release_loc_updating_req(conn);
break;
case GSM48_MT_MM_IMSI_DETACH_IND:
rc = gsm48_rx_mm_imsi_detach_ind(msg);
rc = gsm48_rx_mm_imsi_detach_ind(conn, msg);
break;
case GSM48_MT_MM_CM_REEST_REQ:
DEBUGP(DMM, "CM REESTABLISH REQUEST: Not implemented\n");