aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-02-24 03:12:44 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-02-25 12:17:07 +0100
commit547f048c894cc3e41ca482798f9a13d814f378a5 (patch)
treeeed4a420df565099a497e1a9e9979b2ef347adf2
parentfd1187e2e933122bdea20784a0b6b2a119351651 (diff)
bsc_nat: fail if VTY telnet port cannot be bound, clarify comment
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_nat.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat.c b/openbsc/src/osmo-bsc_nat/bsc_nat.c
index 41291d9b7..2d4f2a801 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_nat.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_nat.c
@@ -1628,13 +1628,16 @@ int main(int argc, char **argv)
osmo_stats_init(tall_bsc_ctx);
/* init vty and parse */
- telnet_init(tall_bsc_ctx, NULL, OSMO_VTY_PORT_BSC_NAT);
+ if (telnet_init(tall_bsc_ctx, NULL, OSMO_VTY_PORT_BSC_NAT)) {
+ fprintf(stderr, "Creating VTY telnet line failed\n");
+ return -5;
+ }
if (mgcp_parse_config(config_file, nat->mgcp_cfg, MGCP_BSC_NAT) < 0) {
fprintf(stderr, "Failed to parse the config file: '%s'\n", config_file);
return -3;
}
- /* over rule the VTY config */
+ /* over rule the VTY config for MSC IP */
if (msc_ip)
bsc_nat_set_msc_ip(nat, msc_ip);