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. cherry-picked from: openbsc.git ac1b03c8e59408336d07527e2597171cb99ed654. Change-Id: Iba018aa57901642ea4c486526a973fe6023e10cf
This commit is contained in:
parent
9d9f44ac71
commit
ac772d8b0c
|
@ -567,7 +567,7 @@ int osmux_enable_conn(struct mgcp_endpoint *endp, struct mgcp_conn_rtp *conn,
|
|||
mgcp_conn_dump(conn->conn));
|
||||
return -1;
|
||||
}
|
||||
if (!osmux_xfrm_input_open_circuit(conn->osmux.in, conn->osmux.cid, osmux_dummy)) {
|
||||
if (osmux_xfrm_input_open_circuit(conn->osmux.in, conn->osmux.cid, osmux_dummy) < 0) {
|
||||
LOGP(DLMGCP, LOGL_ERROR, "Cannot open osmux circuit %u for conn:%s\n",
|
||||
conn->osmux.cid, mgcp_conn_dump(conn->conn));
|
||||
return -1;
|
||||
|
|
Loading…
Reference in New Issue