[PATCH] osmo-pcu[master]: heed VTY 'line vty'/'bind' command

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
Tue Aug 23 15:32:13 UTC 2016


Review at  https://gerrit.osmocom.org/753

heed VTY 'line vty'/'bind' command

Like most other osmo-* programs, bind the telnet VTY to the address specified
by the 'line vty'/'bind' command. This is added by vty_init(), so until now the
PCU offered this config but ignored it.

Also log the VTY bind and port.

Tweak the error message in case telnet init fails (mention 'VTY' in it).

Change-Id: I4cca05a212ec0d493b906014dc3a83e687ebbb1d
---
M src/pcu_main.cpp
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/53/753/1

diff --git a/src/pcu_main.cpp b/src/pcu_main.cpp
index 4e7a832..dcbd95f 100644
--- a/src/pcu_main.cpp
+++ b/src/pcu_main.cpp
@@ -245,9 +245,12 @@
 		fprintf(stderr, "No config file: '%s' Using default config.\n",
 			config_file);
 
-	rc = telnet_init(tall_pcu_ctx, NULL, OSMO_VTY_PORT_PCU);
+	LOGP(DLGLOBAL, LOGL_NOTICE, "VTY at %s %d\n", vty_get_bind_addr(),
+	     OSMO_VTY_PORT_PCU);
+	rc = telnet_init_dynif(tall_pcu_ctx, NULL, vty_get_bind_addr(),
+			       OSMO_VTY_PORT_PCU);
 	if (rc < 0) {
-		fprintf(stderr, "Error initializing telnet\n");
+		fprintf(stderr, "Error initializing telnet VTY\n");
 		exit(1);
 	}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4cca05a212ec0d493b906014dc3a83e687ebbb1d
Gerrit-PatchSet: 1
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: neels_test_account <neels at hofmeyr.de>



More information about the gerrit-log mailing list