summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-11-21 09:19:16 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2018-11-21 09:35:21 +0700
commitd7e2337361f7d0ac47461b94e956b5bd85af5072 (patch)
tree001d2ed445e12e7c9fde65b31ac6eaf82776b992
parentc8de8cb1e126a18c0269571fba38310589dd9273 (diff)
Revert "mobile: fix vty bind ip override"
This reverts commit c8de8cb1e126a18c0269571fba38310589dd9273 (Change-Id I32517567847fd5c54b1742f18bf409ff81e316fa by Max), because several problems were introduced, in particular: a) Help message of mobile application is broken: "The VTY IP to telnet to. (default (null))", "The VTY port number to telnet to. (default 127.0.0.1)". b) Default VTY bind addres != parsed from the config file. c) The (vty_ip == NULL) is resolved only when an external MNCC handler is used, otherwise NULL is passed to l23_app_init(). Change-Id: Ic63a4eb828ff32d3744886b4f5f6f5019c798620
-rw-r--r--src/host/layer23/src/mobile/main.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/host/layer23/src/mobile/main.c b/src/host/layer23/src/mobile/main.c
index 297a5349..115ac419 100644
--- a/src/host/layer23/src/mobile/main.c
+++ b/src/host/layer23/src/mobile/main.c
@@ -31,7 +31,6 @@
#include <osmocom/core/gsmtap.h>
#include <osmocom/core/signal.h>
#include <osmocom/core/application.h>
-#include <osmocom/vty/vty.h>
#include <arpa/inet.h>
@@ -52,7 +51,7 @@ struct llist_head ms_list;
static char *gsmtap_ip = 0;
static const char *custom_cfg_file = NULL;
struct gsmtap_inst *gsmtap_inst = NULL;
-static char *vty_ip = NULL;
+static char *vty_ip = "127.0.0.1";
unsigned short vty_port = 4247;
char *config_dir = NULL;
int use_mncc_sock = 0;
@@ -91,7 +90,7 @@ static void print_help()
printf(" -u --vty-ip The VTY IP to telnet to. "
"(default %s)\n", vty_ip);
printf(" -v --vty-port The VTY port number to telnet to. "
- "(default %s)\n", vty_get_bind_addr());
+ "(default %u)\n", vty_port);
printf(" -d --debug Change debug flags. default: %s\n",
debug_default);
printf(" -D --daemonize Run as daemon\n");
@@ -249,7 +248,7 @@ int main(int argc, char **argv)
config_dir = dirname(config_dir);
if (use_mncc_sock)
- rc = l23_app_init(mncc_recv_socket, config_file, vty_ip ? vty_ip : vty_get_bind_addr(), vty_port);
+ rc = l23_app_init(mncc_recv_socket, config_file, vty_ip, vty_port);
else
rc = l23_app_init(NULL, config_file, vty_ip, vty_port);
if (rc)