[PATCH] osmo-bts[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:39:42 UTC 2016


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

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
BTS 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: Ic4ab32aee08d8a779adeb9943892de0c828c7b3d
---
M src/common/main.c
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/54/754/1

diff --git a/src/common/main.c b/src/common/main.c
index 5e0f1a1..7fc4da7 100644
--- a/src/common/main.c
+++ b/src/common/main.c
@@ -303,9 +303,12 @@
 
 	bts_controlif_setup(bts);
 
-	rc = telnet_init(tall_bts_ctx, NULL, g_vty_port_num);
+	LOGP(DLGLOBAL, LOGL_NOTICE, "VTY at %s %d\n", vty_get_bind_addr(),
+	     g_vty_port_num);
+	rc = telnet_init_dynif(tall_bts_ctx, NULL, vty_get_bind_addr(),
+			       g_vty_port_num);
 	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/754
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic4ab32aee08d8a779adeb9943892de0c828c7b3d
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list