[PATCH] osmo-msc[master]: libmsc/gsm_04_80.c: drop unused 'in_msg' argument

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
Mon Apr 9 18:43:37 UTC 2018


Hello Neels Hofmeyr, Harald Welte, Jenkins Builder,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/7674

to look at the new patch set (#3).

libmsc/gsm_04_80.c: drop unused 'in_msg' argument

It isn't used, so no need to pass it.

Change-Id: I4248ebf8626d3f7f0bf273fd20cc4f64e979938b
---
M include/osmocom/msc/gsm_04_80.h
M src/libmsc/gsm_04_80.c
M src/libmsc/ussd.c
3 files changed, 9 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/74/7674/3

diff --git a/include/osmocom/msc/gsm_04_80.h b/include/osmocom/msc/gsm_04_80.h
index 7da45a0..dedf243 100644
--- a/include/osmocom/msc/gsm_04_80.h
+++ b/include/osmocom/msc/gsm_04_80.h
@@ -7,10 +7,9 @@
 struct gsm_subscriber_connection;
 
 int gsm0480_send_ussd_response(struct gsm_subscriber_connection *conn,
-			       const struct msgb *in_msg, const char* response_text,
+			       const char* response_text,
 			       const struct ss_request *req);
 int gsm0480_send_ussd_reject(struct gsm_subscriber_connection *conn,
-			     const struct msgb *msg,
 			     const struct ss_request *request);
 
 int msc_send_ussd_notify(struct gsm_subscriber_connection *conn, int level,
diff --git a/src/libmsc/gsm_04_80.c b/src/libmsc/gsm_04_80.c
index 37e058c..12b41a1 100644
--- a/src/libmsc/gsm_04_80.c
+++ b/src/libmsc/gsm_04_80.c
@@ -62,8 +62,7 @@
 
 /* Send response to a mobile-originated ProcessUnstructuredSS-Request */
 int gsm0480_send_ussd_response(struct gsm_subscriber_connection *conn,
-			       const struct msgb *in_msg, const char *response_text,
-			       const struct ss_request *req)
+			       const char *response_text, const struct ss_request *req)
 {
 	struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 USSD RSP");
 	struct gsm48_hdr *gh;
@@ -110,7 +109,6 @@
 }
 
 int gsm0480_send_ussd_reject(struct gsm_subscriber_connection *conn,
-			     const struct msgb *in_msg,
 			     const struct ss_request *req)
 {
 	struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 USSD REJ");
diff --git a/src/libmsc/ussd.c b/src/libmsc/ussd.c
index eeab52a..748cfbb 100644
--- a/src/libmsc/ussd.c
+++ b/src/libmsc/ussd.c
@@ -40,7 +40,8 @@
 const char USSD_TEXT_OWN_NUMBER[] = "*#100#";
 
 /* A network-specific handler function */
-static int send_own_number(struct gsm_subscriber_connection *conn, const struct msgb *msg, const struct ss_request *req)
+static int send_own_number(struct gsm_subscriber_connection *conn,
+			   const struct ss_request *req)
 {
 	char *own_number = conn->vsub->msisdn;
 	char response_string[GSM_EXTENSION_LENGTH + 20];
@@ -50,7 +51,7 @@
 
 	/* Need trailing CR as EOT character */
 	snprintf(response_string, sizeof(response_string), "Your extension is %s\r", own_number);
-	return gsm0480_send_ussd_response(conn, msg, response_string, req);
+	return gsm0480_send_ussd_response(conn, response_string, req);
 }
 
 /* Entrypoint - handler function common to all mobile-originated USSDs */
@@ -72,7 +73,7 @@
 	rc = gsm0480_decode_ss_request(gh, msgb_l3len(msg), &req);
 	if (!rc) {
 		DEBUGP(DMM, "Unhandled SS\n");
-		rc = gsm0480_send_ussd_reject(conn, msg, &req);
+		rc = gsm0480_send_ussd_reject(conn, &req);
 		return rc;
 	}
 
@@ -80,7 +81,7 @@
 	if (req.ussd_text[0] == '\0' || req.ussd_text[0] == 0xFF) {
 		if (req.ss_code > 0) {
 			/* Assume interrogateSS or modification of it and reject */
-			rc = gsm0480_send_ussd_reject(conn, msg, &req);
+			rc = gsm0480_send_ussd_reject(conn, &req);
 			return rc;
 		}
 		/* Still assuming a Release-Complete and returning */
@@ -90,10 +91,10 @@
 	msc_subscr_conn_communicating(conn);
 	if (!strcmp(USSD_TEXT_OWN_NUMBER, (const char *)req.ussd_text)) {
 		DEBUGP(DMM, "USSD: Own number requested\n");
-		rc = send_own_number(conn, msg, &req);
+		rc = send_own_number(conn, &req);
 	} else {
 		DEBUGP(DMM, "Unhandled USSD %s\n", req.ussd_text);
-		rc = gsm0480_send_ussd_reject(conn, msg, &req);
+		rc = gsm0480_send_ussd_reject(conn, &req);
 	}
 
 	return rc;

-- 
To view, visit https://gerrit.osmocom.org/7674
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I4248ebf8626d3f7f0bf273fd20cc4f64e979938b
Gerrit-PatchSet: 3
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>



More information about the gerrit-log mailing list