Change in osmo-msc[master]: SMS-over-GSUP: move net->sms_over_gsup check to gsm411_gsup_rx()

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:35:47 UTC 2020


fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/17871 )

Change subject: SMS-over-GSUP: move net->sms_over_gsup check to gsm411_gsup_rx()
......................................................................

SMS-over-GSUP: move net->sms_over_gsup check to gsm411_gsup_rx()

Change-Id: I89988b7148b164af304ecae1f53b74f322fdc7bd
---
M src/libmsc/gsm_04_11_gsup.c
1 file changed, 8 insertions(+), 16 deletions(-)

Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, approved
  laforge: Looks good to me, but someone else must approve



diff --git a/src/libmsc/gsm_04_11_gsup.c b/src/libmsc/gsm_04_11_gsup.c
index dfc90cc..1751655 100644
--- a/src/libmsc/gsm_04_11_gsup.c
+++ b/src/libmsc/gsm_04_11_gsup.c
@@ -149,14 +149,6 @@
 		OSMO_ASSERT(0);
 	}
 
-	/* Make sure that 'SMS over GSUP' is expected */
-	if (!net->sms_over_gsup) {
-		/* TODO: notify sender about that? */
-		LOGP(DLSMS, LOGL_NOTICE, "Unexpected MO SMS over GSUP "
-			"(sms-over-gsup is not enabled), ignoring message...\n");
-		return -EIO;
-	}
-
 	/* Verify GSUP message */
 	if (!gsup_msg->sm_rp_mr)
 		goto msg_error;
@@ -241,14 +233,6 @@
 
 	LOGP(DLSMS, LOGL_DEBUG, "RX MT-forwardSM-Req\n");
 
-	/* Make sure that 'SMS over GSUP' is expected */
-	if (!net->sms_over_gsup) {
-		LOGP(DLSMS, LOGL_NOTICE, "Unexpected MT SMS over GSUP "
-			"(sms-over-gsup is not enabled), ignoring message...\n");
-		/* TODO: notify sender about that? */
-		return -EIO;
-	}
-
 	/**
 	 * Verify GSUP message
 	 *
@@ -296,6 +280,14 @@
 	struct vlr_subscr *vsub;
 	int rc;
 
+	/* Make sure that 'SMS over GSUP' is expected */
+	if (!net->sms_over_gsup) {
+		/* TODO: notify sender about that? */
+		LOGP(DLSMS, LOGL_NOTICE, "Unexpected MO/MT SMS over GSUP "
+			"(sms-over-gsup is not enabled), ignoring message...\n");
+		return -EIO;
+	}
+
 	vsub = vlr_subscr_find_by_imsi(net->vlr, gsup_msg->imsi, __func__);
 	if (!vsub) {
 		LOGP(DLSMS, LOGL_ERROR, "Rx %s for unknown subscriber, rejecting\n",

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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I89988b7148b164af304ecae1f53b74f322fdc7bd
Gerrit-Change-Number: 17871
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200430/3d40d6b0/attachment.htm>


More information about the gerrit-log mailing list