[MERGED] osmo-mgw[master]: mgcp_client_vty.c: Fix VTY compatibility with 'mgcpgw bts-base'

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

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Mon Nov 6 13:45:04 UTC 2017


Neels Hofmeyr has submitted this change and it was merged.

Change subject: mgcp_client_vty.c: Fix VTY compatibility with 'mgcpgw bts-base'
......................................................................


mgcp_client_vty.c: Fix VTY compatibility with 'mgcpgw bts-base'

Commit 87203f2a3746d708f85ee75d978e2821bda58e6d renamed some cmds to use
mgw instead of mgcpgw, and added deprecated alias for the old commands,
but forgot to add one for 'mgcpgw bts-base'. This commit fixes
backawards compatibility with old config files that mentioned commit
introduced.

Change-Id: Ib1c58945f4203b05d79f367afb3082b9a6a2c4e3
---
M src/libosmo-mgcp-client/mgcp_client_vty.c
1 file changed, 10 insertions(+), 4 deletions(-)

Approvals:
  Neels Hofmeyr: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/libosmo-mgcp-client/mgcp_client_vty.c b/src/libosmo-mgcp-client/mgcp_client_vty.c
index 0a30436..e1a892f 100644
--- a/src/libosmo-mgcp-client/mgcp_client_vty.c
+++ b/src/libosmo-mgcp-client/mgcp_client_vty.c
@@ -125,8 +125,8 @@
 
 #define BTS_START_STR "First UDP port allocated for the BTS side\n"
 #define UDP_PORT_STR "UDP Port number\n"
-DEFUN(cfg_mgcp_rtp_bts_base_port,
-      cfg_mgcp_rtp_bts_base_port_cmd,
+DEFUN(cfg_mgw_rtp_bts_base_port,
+      cfg_mgw_rtp_bts_base_port_cmd,
       "mgw bts-base <0-65534>",
       MGW_STR
       BTS_START_STR
@@ -135,6 +135,12 @@
 	global_mgcp_client_conf->bts_base = atoi(argv[0]);
 	return CMD_SUCCESS;
 }
+ALIAS_DEPRECATED(cfg_mgw_rtp_bts_base_port,
+      cfg_mgcpgw_rtp_bts_base_port_cmd,
+      "mgcpgw bts-base <0-65534>",
+      MGW_STR
+      BTS_START_STR
+      UDP_PORT_STR)
 
 int mgcp_client_config_write(struct vty *vty, const char *indent)
 {
@@ -188,6 +194,7 @@
 	install_element(node, &cfg_mgw_remote_ip_cmd);
 	install_element(node, &cfg_mgw_remote_port_cmd);
 	install_element(node, &cfg_mgw_endpoint_range_cmd);
+	install_element(node, &cfg_mgw_rtp_bts_base_port_cmd);
 
 	/* deprecated 'mgcpgw' commands */
 	install_element(node, &cfg_mgcpgw_local_ip_cmd);
@@ -195,6 +202,5 @@
 	install_element(node, &cfg_mgcpgw_remote_ip_cmd);
 	install_element(node, &cfg_mgcpgw_remote_port_cmd);
 	install_element(node, &cfg_mgcpgw_endpoint_range_cmd);
-
-	install_element(node, &cfg_mgcp_rtp_bts_base_port_cmd);
+	install_element(node, &cfg_mgcpgw_rtp_bts_base_port_cmd);
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib1c58945f4203b05d79f367afb3082b9a6a2c4e3
Gerrit-PatchSet: 1
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list