path: root/src
diff options
authorVadim Yanitskiy <>2018-11-21 09:19:16 +0700
committerVadim Yanitskiy <>2018-11-21 09:35:21 +0700
commitd7e2337361f7d0ac47461b94e956b5bd85af5072 (patch)
tree001d2ed445e12e7c9fde65b31ac6eaf82776b992 /src
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". 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
Diffstat (limited to 'src')
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 297a534..115ac41 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 = "";
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",
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);
rc = l23_app_init(NULL, config_file, vty_ip, vty_port);
if (rc)