Harald Welte has submitted this change and it was merged.

Change subject: mobile: Print an error message if the VTY cannot be initialized
......................................................................


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
---
M src/host/layer23/src/mobile/app_mobile.c
1 file changed, 4 insertions(+), 1 deletion(-)

Approvals:
  Vadim Yanitskiy: Looks good to me, but someone else must approve
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/host/layer23/src/mobile/app_mobile.c 
b/src/host/layer23/src/mobile/app_mobile.c
index 6e1fffb..b0e2a13 100644
--- a/src/host/layer23/src/mobile/app_mobile.c
+++ b/src/host/layer23/src/mobile/app_mobile.c
@@ -464,8 +464,11 @@
        }
        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);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I24161f53fa621ae1c8b1916bd0c8055c494b531e
Gerrit-PatchSet: 1
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Owner: Stefan Sperling <ssperl...@sysmocom.de>
Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Vadim Yanitskiy <axilira...@gmail.com>

Reply via email to