Change in osmo-msc[master]: gsup_client_mux_tx_error_reply(): handle optional routing IEs

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/.

fixeria gerrit-no-reply at lists.osmocom.org
Thu Apr 30 07:11:56 UTC 2020


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/17984 )


Change subject: gsup_client_mux_tx_error_reply(): handle optional routing IEs
......................................................................

gsup_client_mux_tx_error_reply(): handle optional routing IEs

If received GSUP message contains at least the source name IE,
then the error message sent in response sould not omit the
routing information. Let's also include them.

Change-Id: I2694ea15d2cf57316f2eae845afb957a3e8067b6
---
M src/libmsc/gsup_client_mux.c
1 file changed, 16 insertions(+), 0 deletions(-)



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

diff --git a/src/libmsc/gsup_client_mux.c b/src/libmsc/gsup_client_mux.c
index e425651..2e6f25d 100644
--- a/src/libmsc/gsup_client_mux.c
+++ b/src/libmsc/gsup_client_mux.c
@@ -161,6 +161,22 @@
 
 	OSMO_STRLCPY_ARRAY(gsup_reply.imsi, gsup_orig->imsi);
 
+	/* Handle optional routing IEs */
+	if (gsup_orig->source_name && gsup_orig->source_name_len) {
+		/* We respond to the sender of the original message */
+		gsup_reply.destination_name_len = gsup_orig->source_name_len;
+		gsup_reply.destination_name = gsup_orig->source_name;
+
+		/* We're sending an error, so we're the source */
+		const char *local_msc_name = gcm->gsup_client->ipa_dev->serno;
+		if (!local_msc_name)
+			local_msc_name = gcm->gsup_client->ipa_dev->unit_name;
+		if (local_msc_name) {
+			gsup_reply.source_name_len = strlen(local_msc_name) + 1;
+			gsup_reply.source_name = gsup_orig->source_name;
+		}
+	}
+
 	/* For SS/USSD, it's important to keep both session state and ID IEs */
 	if (gsup_orig->session_state != OSMO_GSUP_SESSION_STATE_NONE) {
 		gsup_reply.session_state = OSMO_GSUP_SESSION_STATE_END;

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/17984
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I2694ea15d2cf57316f2eae845afb957a3e8067b6
Gerrit-Change-Number: 17984
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200430/37e5bc6b/attachment.htm>


More information about the gerrit-log mailing list