laforge has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-msc/+/28115 )
Change subject: vlr: Split vlr_subscr_rx_imsi_detach()
......................................................................
vlr: Split vlr_subscr_rx_imsi_detach()
The function vlr_subscr_rx_imsi_detach() implies that an explicit IMSI
DETACH was received. However, that same function was called in other
situations such as timer expiration or GSUP CANCEL.
Let's clean this up by splitting the function into two parts.
No logical change is introduced to the VLR in this patch.
Change-Id: Iffc02f3062ad591ca372a3c6d866066cf63a8830
---
M src/libvlr/vlr.c
1 file changed, 11 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/15/28115/1
diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c
index fc23b37..f98fee6 100644
--- a/src/libvlr/vlr.c
+++ b/src/libvlr/vlr.c
@@ -55,6 +55,8 @@
* Convenience functions
***********************************************************************/
+static int vlr_subscr_detach(struct vlr_subscr *vsub);
+
const struct value_string vlr_ciph_names[] = {
OSMO_VALUE_STRING(VLR_CIPH_NONE),
OSMO_VALUE_STRING(VLR_CIPH_A5_1),
@@ -578,7 +580,7 @@
continue;
LOGP(DVLR, LOGL_DEBUG, "%s: Location Update expired\n",
vlr_subscr_name(vsub));
- vlr_subscr_rx_imsi_detach(vsub);
+ vlr_subscr_detach(vsub);
}
done:
@@ -1070,7 +1072,7 @@
vlr_gmm_cause_to_mm_cause(gsup_msg->cause, &gsm48_rej);
vlr_subscr_cancel_attach_fsm(vsub, fsm_cause, gsm48_rej);
- vlr_subscr_rx_imsi_detach(vsub);
+ vlr_subscr_detach(vsub);
return rc;
}
@@ -1236,8 +1238,7 @@
return false;
}
-/* See TS 23.012 version 9.10.0 4.3.2.1 "Process Detach_IMSI_VLR" */
-int vlr_subscr_rx_imsi_detach(struct vlr_subscr *vsub)
+static int vlr_subscr_detach(struct vlr_subscr *vsub)
{
/* paranoia: should any LU or PARQ FSMs still be running, stop them. */
vlr_subscr_cancel_attach_fsm(vsub, OSMO_FSM_TERM_ERROR, GSM48_REJECT_CONGESTION);
@@ -1253,6 +1254,12 @@
return 0;
}
+/* See TS 23.012 version 9.10.0 4.3.2.1 "Process Detach_IMSI_VLR" */
+int vlr_subscr_rx_imsi_detach(struct vlr_subscr *vsub)
+{
+ return vlr_subscr_detach(vsub);
+}
+
/* Tear down any running FSMs due to MSC connection timeout.
* Visit all vsub->*_fsm pointers and give them a queue to send a final reject
* message before the entire connection is torn down.
--
To view, visit
https://gerrit.osmocom.org/c/osmo-msc/+/28115
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Iffc02f3062ad591ca372a3c6d866066cf63a8830
Gerrit-Change-Number: 28115
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange