Change in osmo-mgw[master]: mgcp_vty: remove remains of loopback functionality

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

dexter gerrit-no-reply at lists.osmocom.org
Tue Sep 22 14:25:45 UTC 2020


dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/20247 )


Change subject: mgcp_vty: remove remains of loopback functionality
......................................................................

mgcp_vty: remove remains of loopback functionality

There exist trunk_loop commands, which sets an trunk->audio_loop
variable, however all it does is to turn on a log message. There is no
actual implementation present. Lets set the VTY commands to
DEFUN_DEPRECATED and remove the variable.

Change-Id: I72b0f8b908e32643e6e3db6ac024371b13c074a1
---
M include/osmocom/mgcp/mgcp_trunk.h
M src/libosmo-mgcp/mgcp_network.c
M src/libosmo-mgcp/mgcp_vty.c
3 files changed, 8 insertions(+), 34 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/47/20247/1

diff --git a/include/osmocom/mgcp/mgcp_trunk.h b/include/osmocom/mgcp/mgcp_trunk.h
index 1002adb..8127181 100644
--- a/include/osmocom/mgcp/mgcp_trunk.h
+++ b/include/osmocom/mgcp/mgcp_trunk.h
@@ -24,7 +24,6 @@
 	char *audio_fmtp_extra;
 	int audio_send_ptime;
 	int audio_send_name;
-	int audio_loop;
 
 	int no_audio_transcoding;
 
diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c
index fa40f1f..b452201 100644
--- a/src/libosmo-mgcp/mgcp_network.c
+++ b/src/libosmo-mgcp/mgcp_network.c
@@ -893,10 +893,6 @@
 		LOGPENDP(endp, DRTP, LOGL_DEBUG, "delivering RTCP packet...\n");
 	}
 
-	LOGPENDP(endp, DRTP, LOGL_DEBUG, "loop:%d, mode:%d%s\n",
-		 trunk->audio_loop, conn_src->conn->mode,
-		 conn_src->conn->mode == MGCP_CONN_LOOPBACK ? " (loopback)" : "");
-
 	/* FIXME: It is legal that the payload type on the egress connection is
 	 * different from the payload type that has been negotiated on the
 	 * ingress connection. Essentially the codecs are the same so we can
diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c
index aa27d41..cc7c5b8 100644
--- a/src/libosmo-mgcp/mgcp_vty.c
+++ b/src/libosmo-mgcp/mgcp_vty.c
@@ -115,7 +115,6 @@
 		trunk->audio_send_ptime ? "" : "no ", VTY_NEWLINE);
 	vty_out(vty, " %ssdp audio-payload send-name%s",
 		trunk->audio_send_name ? "" : "no ", VTY_NEWLINE);
-	vty_out(vty, " loop %u%s", ! !trunk->audio_loop, VTY_NEWLINE);
 	vty_out(vty, " number endpoints %u%s",
 		trunk->v.vty_number_endpoints, VTY_NEWLINE);
 	vty_out(vty, " %sallow-transcoding%s",
@@ -712,18 +711,11 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_mgcp_loop,
-      cfg_mgcp_loop_cmd,
-      "loop (0|1)",
-      "Loop audio for all endpoints on main trunk\n" "Don't Loop\n" "Loop\n")
+DEFUN_DEPRECATED(cfg_mgcp_loop,
+		 cfg_mgcp_loop_cmd,
+		 "loop (0|1)",
+		 "Loop audio for all endpoints on main trunk\n" "Don't Loop\n" "Loop\n")
 {
-	struct mgcp_trunk *trunk = mgcp_trunk_by_num(g_cfg, MGCP_TRUNK_VIRTUAL, MGCP_VIRT_TRUNK_ID);
-	OSMO_ASSERT(trunk);
-	if (g_cfg->osmux) {
-		vty_out(vty, "Cannot use `loop' with `osmux'.%s", VTY_NEWLINE);
-		return CMD_WARNING;
-	}
-	trunk->audio_loop = atoi(argv[0]);
 	return CMD_SUCCESS;
 }
 
@@ -947,7 +939,6 @@
 				trunk->keepalive_interval, VTY_NEWLINE);
 		else
 			vty_out(vty, "  no rtp keep-alive%s", VTY_NEWLINE);
-		vty_out(vty, "  loop %d%s", trunk->audio_loop, VTY_NEWLINE);
 		vty_out(vty, "  force-realloc %d%s",
 			trunk->force_realloc, VTY_NEWLINE);
 		vty_out(vty, "  rtp-accept-all %d%s",
@@ -1019,18 +1010,11 @@
 		 "sdp audio payload name NAME",
 		 SDP_STR AUDIO_STR AUDIO_STR "Payload\n" "Payload Name\n")
 
-DEFUN(cfg_trunk_loop,
-      cfg_trunk_loop_cmd,
-      "loop (0|1)",
-      "Loop audio for all endpoints on this trunk\n" "Don't Loop\n" "Loop\n")
+DEFUN_DEPRECATED(cfg_trunk_loop,
+		 cfg_trunk_loop_cmd,
+		 "loop (0|1)",
+		 "Loop audio for all endpoints on this trunk\n" "Don't Loop\n" "Loop\n")
 {
-	struct mgcp_trunk *trunk = vty->index;
-
-	if (g_cfg->osmux) {
-		vty_out(vty, "Cannot use `loop' with `osmux'.%s", VTY_NEWLINE);
-		return CMD_WARNING;
-	}
-	trunk->audio_loop = atoi(argv[0]);
 	return CMD_SUCCESS;
 }
 
@@ -1445,11 +1429,6 @@
 	else if (strcmp(argv[0], "only") == 0)
 		g_cfg->osmux = OSMUX_USAGE_ONLY;
 
-	if (trunk->audio_loop) {
-		vty_out(vty, "Cannot use `loop' with `osmux'.%s", VTY_NEWLINE);
-		return CMD_WARNING;
-	}
-
 	return CMD_SUCCESS;
 
 }

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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I72b0f8b908e32643e6e3db6ac024371b13c074a1
Gerrit-Change-Number: 20247
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200922/3a465887/attachment.htm>


More information about the gerrit-log mailing list