summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Sperling <ssperling@sysmocom.de>2018-01-18 15:38:05 +0100
committerStefan Sperling <ssperling@sysmocom.de>2018-01-18 15:40:57 +0100
commitdf1049f3808ebaeebe743c203082124d6447964b (patch)
treec56db8d70d0953c79ef824d22d91e3ae5ba82e33
parent96e5f8cbe57d55a274cfba1ac7f4961b29bab6fe (diff)
mobile: Print an error message if the VTY cannot be initialized
If we fail to initialize the VTY, print an error mesage instead of failing silently. For example: "Cannot init VTY on 127.0.0.1 port 4247: Address already in use" Change-Id: I24161f53fa621ae1c8b1916bd0c8055c494b531e
-rw-r--r--src/host/layer23/src/mobile/app_mobile.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c
index 6e1fffb8..b0e2a138 100644
--- a/src/host/layer23/src/mobile/app_mobile.c
+++ b/src/host/layer23/src/mobile/app_mobile.c
@@ -464,8 +464,11 @@ int l23_app_init(int (*mncc_recv)(struct osmocom_ms *ms, int, void *),
}
vty_reading = 0;
rc = telnet_init_dynif(l23_ctx, NULL, vty_ip, vty_port);
- if (rc < 0)
+ if (rc < 0) {
+ fprintf(stderr, "Cannot init VTY on %s port %u: %s\n",
+ vty_ip, vty_port, strerror(errno));
return rc;
+ }
printf("VTY available on %s %u\n", vty_ip, vty_port);
osmo_signal_register_handler(SS_GLOBAL, &global_signal_cb, NULL);