summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2012-07-10 08:53:27 +0200
committerHarald Welte <laforge@gnumonks.org>2012-07-13 14:24:27 +0200
commitbe8df5523d36c0bcf7de04d5f14f642ee981f09c (patch)
treeadee98b49c3f3d0728e747ddd6a6834149954379
parentdafdfb5700f5b82bb12d1b3a6f168540ccefb2ec (diff)
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.
-rw-r--r--openbsc/src/libmsc/gsm_04_08.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c
index c6a5436..9bdc39c 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");