From be8df5523d36c0bcf7de04d5f14f642ee981f09c Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Tue, 10 Jul 2012 08:53:27 +0200 Subject: 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. --- openbsc/src/libmsc/gsm_04_08.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'openbsc/src/libmsc/gsm_04_08.c') diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index c6a543606..9bdc39cc8 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -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"); -- cgit v1.2.3