From 761127b6b419bda5a0d062711e831fb7ee7f583c Mon Sep 17 00:00:00 2001 From: Bhaskar Date: Mon, 20 May 2013 11:34:50 +0530 Subject: host/mobile: Fixup in error checking path of l23_app_init From: Bhaskar Signed-off-by: Sylvain Munaut --- src/host/layer23/src/mobile/app_mobile.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c index 09ff7859..9f28b0ac 100644 --- a/src/host/layer23/src/mobile/app_mobile.c +++ b/src/host/layer23/src/mobile/app_mobile.c @@ -402,7 +402,7 @@ int l23_app_init(int (*mncc_recv)(struct osmocom_ms *ms, int, void *), } } vty_reading = 0; - telnet_init_dynif(l23_ctx, NULL, vty_ip, vty_port); + rc = telnet_init_dynif(l23_ctx, NULL, vty_ip, vty_port); if (rc < 0) return rc; printf("VTY available on port %u.\n", vty_port); @@ -416,8 +416,11 @@ int l23_app_init(int (*mncc_recv)(struct osmocom_ms *ms, int, void *), printf("No Mobile Station defined, creating: MS '1'\n"); ms = mobile_new("1"); - if (ms) - mobile_init(ms); + if (ms) { + rc = mobile_init(ms); + if (rc < 0) + return rc; + } } quit = 0; -- cgit v1.2.3