jolly has uploaded this change for review.

View Change

Create transaction for all call indepenant SS messages

When an initial call-independent supplementary service message is
received, it is checked whether the message is a REGISTER message.
If it is not, the MSC will reject it by sending a RELEASE COMPLETE
message.

This patch ensures that a transaction is created even if the message
is not a REGISTER message. If the message is not a REGISTER message,
the transaction is freed after sending the RELEASE COMPLETE message.
The release of the transaction immediately releases the BSSMAP
connection, if there are no other ongoing transactions.

Without this patch, the msc_a_fsm would wait 5 seconds for an initial
transaction before releasing the BSSMAP connection.

Related: OS#6427
Change-Id: Ic6765e5d480735e67d97f0f560da24653b26d487
---
M src/libmsc/gsm_09_11.c
1 file changed, 23 insertions(+), 18 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/05/38305/1
diff --git a/src/libmsc/gsm_09_11.c b/src/libmsc/gsm_09_11.c
index e293890..7b98734 100644
--- a/src/libmsc/gsm_09_11.c
+++ b/src/libmsc/gsm_09_11.c
@@ -127,24 +127,6 @@
/* Count MS-initiated attempts to establish a NC SS/USSD session */
rate_ctr_inc(rate_ctr_group_get_ctr(net->msc_ctrs, MSC_CTR_NC_SS_MO_REQUESTS));

- /**
- * According to GSM TS 04.80, section 2.4.2 "Register
- * (mobile station to network direction)", the REGISTER
- * message is sent by the mobile station to the network
- * to assign a new transaction identifier for call independent
- * supplementary service control and to request or acknowledge
- * a supplementary service.
- */
- if (msg_type != GSM0480_MTYPE_REGISTER) {
- LOGP(DSS, LOGL_ERROR, "Rx %s message for non-existing transaction (tid-%u)\n",
- gsm48_pdisc_msgtype_name(GSM48_PDISC_NC_SS, msg_type),
- gsm48_hdr_trans_id(gh));
- gsm48_tx_simple(msc_a,
- GSM48_PDISC_NC_SS | (tid << 4),
- GSM0480_MTYPE_RELEASE_COMPLETE);
- return -EINVAL;
- }
-
trans = trans_alloc(net, vsub, TRANS_USSD, tid, new_callref++);
if (!trans) {
LOGP(DSS, LOGL_ERROR, " -> No memory for trans\n");
@@ -173,6 +155,29 @@
"Creating new MO SS transaction without prior CM Service Request\n");
else
msc_a_put(msc_a, MSC_A_USE_CM_SERVICE_SS);
+
+ /**
+ * According to GSM TS 04.80, section 2.4.2 "Register
+ * (mobile station to network direction)", the REGISTER
+ * message is sent by the mobile station to the network
+ * to assign a new transaction identifier for call independent
+ * supplementary service control and to request or acknowledge
+ * a supplementary service.
+ */
+ if (msg_type != GSM0480_MTYPE_REGISTER) {
+ LOGP(DSS, LOGL_ERROR, "Rx %s message for non-existing transaction (tid-%u)\n",
+ gsm48_pdisc_msgtype_name(GSM48_PDISC_NC_SS, msg_type),
+ gsm48_hdr_trans_id(gh));
+ gsm48_tx_simple(msc_a,
+ GSM48_PDISC_NC_SS | (tid << 4),
+ GSM0480_MTYPE_RELEASE_COMPLETE);
+
+ /* Terminate transaction */
+ trans_free(trans);
+
+ return -EINVAL;
+ }
+
}

LOG_TRANS(trans, LOGL_DEBUG, "Received SS/USSD msg %s\n",

To view, visit change 38305. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Ic6765e5d480735e67d97f0f560da24653b26d487
Gerrit-Change-Number: 38305
Gerrit-PatchSet: 1
Gerrit-Owner: jolly <andreas@eversberg.eu>