aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-09-10 19:09:20 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2018-09-10 19:09:24 +0200
commitac1b03c8e59408336d07527e2597171cb99ed654 (patch)
treef5ee3d2fd1ad46f282f100e48451cc61d9905117 /openbsc
parent87c8dfb9dc8abb3ef455038bedba9645aaf86fd7 (diff)
mgcp_osmux.c: osmux_enable_endpoint: Fix incorrect return check
osmux_xfrm_input_open_circuit returns 0 on success and -1 on error. Confusion comes from that function being implemented by calling osmux_batch_add_circuit which returns NULL on error. Change-Id: I98700aa1e2fab9784706bfac1a47cc84635172b7
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/src/libmgcp/mgcp_osmux.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/openbsc/src/libmgcp/mgcp_osmux.c b/openbsc/src/libmgcp/mgcp_osmux.c
index 69124d2a9..8a802f53c 100644
--- a/openbsc/src/libmgcp/mgcp_osmux.c
+++ b/openbsc/src/libmgcp/mgcp_osmux.c
@@ -456,8 +456,8 @@ int osmux_enable_endpoint(struct mgcp_endpoint *endp, struct in_addr *addr, uint
LOGP(DMGCP, LOGL_ERROR, "Cannot allocate input osmux handle\n");
return -1;
}
- if (!osmux_xfrm_input_open_circuit(endp->osmux.in, endp->osmux.cid,
- endp->cfg->osmux_dummy)) {
+ if (osmux_xfrm_input_open_circuit(endp->osmux.in, endp->osmux.cid,
+ endp->cfg->osmux_dummy) < 0) {
LOGP(DMGCP, LOGL_ERROR, "Cannot open osmux circuit %u\n",
endp->osmux.cid);
return -1;