Change in osmo-msc[master]: transaction: clarify late transaction ID assignment

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Vadim Yanitskiy gerrit-no-reply at lists.osmocom.org
Thu Feb 14 09:54:58 UTC 2019


Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/12901


Change subject: transaction: clarify late transaction ID assignment
......................................................................

transaction: clarify late transaction ID assignment

Change-Id: I2d3a6334f49989bedbb1430d26ffad8b61dfd873
---
M include/osmocom/msc/transaction.h
M src/libmsc/gsm_04_08_cc.c
2 files changed, 6 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/01/12901/1

diff --git a/include/osmocom/msc/transaction.h b/include/osmocom/msc/transaction.h
index c5c740c..5e8d637 100644
--- a/include/osmocom/msc/transaction.h
+++ b/include/osmocom/msc/transaction.h
@@ -9,6 +9,9 @@
 #include <osmocom/gsm/gsm0411_smc.h>
 #include <osmocom/gsm/gsm0411_smr.h>
 
+/* Used for late TID assignment */
+#define TRANS_ID_UNASSIGNED 0xff
+
 enum bridge_state {
 	BRIDGE_STATE_NONE,
 	BRIDGE_STATE_LOOPBACK_PENDING,
diff --git a/src/libmsc/gsm_04_08_cc.c b/src/libmsc/gsm_04_08_cc.c
index b84fd03..98c2aa3 100644
--- a/src/libmsc/gsm_04_08_cc.c
+++ b/src/libmsc/gsm_04_08_cc.c
@@ -617,7 +617,7 @@
 	gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh));
 
 	/* transaction id must not be assigned */
-	if (trans->transaction_id != 0xff) { /* unasssigned */
+	if (trans->transaction_id != TRANS_ID_UNASSIGNED) {
 		DEBUGP(DCC, "TX Setup with assigned transaction. "
 			"This is not allowed!\n");
 		/* Temporarily out of order */
@@ -1928,7 +1928,8 @@
 						GSM48_CC_CAUSE_DEST_OOO);
 		}
 		/* Create transaction */
-		trans = trans_alloc(net, vsub, GSM48_PDISC_CC, 0xff, data->callref);
+		trans = trans_alloc(net, vsub, GSM48_PDISC_CC,
+				    TRANS_ID_UNASSIGNED, data->callref);
 		if (!trans) {
 			LOGP(DCC, LOGL_ERROR, "No memory for trans.\n");
 			vlr_subscr_put(vsub);

-- 
To view, visit https://gerrit.osmocom.org/12901
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2d3a6334f49989bedbb1430d26ffad8b61dfd873
Gerrit-Change-Number: 12901
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190214/d5cd26c6/attachment.htm>


More information about the gerrit-log mailing list