aboutsummaryrefslogtreecommitdiffstats
path: root/src/gb/gprs_ns2_vty.c
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2020-10-01 19:05:28 +0200
committerAlexander Couzens <lynxis@fe80.eu>2020-10-01 19:33:00 +0200
commit477ffb0e72773607dbabe7adf2473818008589c0 (patch)
tree29c799e11ea1d5e3b7f34f08926e157280ba6446 /src/gb/gprs_ns2_vty.c
parent6b5f1de06d1429de388ad027e2ebc2b124c83bd0 (diff)
ns2: parse the return code of gprs_ns2_ip_bind
Fixes a crash when the bind fails. Change-Id: I96c8e871a350f8f7b9ba2450bb37b90b535f42e2
Diffstat (limited to 'src/gb/gprs_ns2_vty.c')
-rw-r--r--src/gb/gprs_ns2_vty.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gb/gprs_ns2_vty.c b/src/gb/gprs_ns2_vty.c
index 9deb3a10..d274cbeb 100644
--- a/src/gb/gprs_ns2_vty.c
+++ b/src/gb/gprs_ns2_vty.c
@@ -758,8 +758,7 @@ int gprs_ns2_vty_create() {
} else {
/* UDP */
osmo_sockaddr_str_to_sockaddr(&priv.udp, &sockaddr.u.sas);
- gprs_ns2_ip_bind(vty_nsi, &sockaddr, priv.dscp, &bind);
- if (!bind) {
+ if (gprs_ns2_ip_bind(vty_nsi, &sockaddr, priv.dscp, &bind)) {
/* TODO: could not bind on the specific address */
return -1;
}