summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBhaskar <niceguy108@gmail.com>2013-05-20 11:34:50 +0530
committerSylvain Munaut <tnt@246tNt.com>2013-05-23 08:28:18 +0200
commit761127b6b419bda5a0d062711e831fb7ee7f583c (patch)
tree2fb666c35b19d072d4e46423b91637220a44539e
parentc6cab89f760726b30fc39df5f2faed50939e8275 (diff)
host/mobile: Fixup in error checking path of l23_app_init
From: Bhaskar <niceguy108@gmail.com> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
-rw-r--r--src/host/layer23/src/mobile/app_mobile.c9
1 files 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;