aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-10-12 19:22:21 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2018-10-12 19:22:23 +0200
commit37a0307b6193c9b108cfd1aa2a88517a8b5cb907 (patch)
tree7f142f46cc3f033560bec6cf3edf07c3b64d7720 /openbsc/src
parent297f7bbe2ba87d167558d8a05de5ec742c0d1f84 (diff)
mgcp: osmux_send_dummy: Avoid logging incorrectly and sending if osmux not enabled
Diffstat (limited to 'openbsc/src')
-rw-r--r--openbsc/src/libmgcp/mgcp_osmux.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/openbsc/src/libmgcp/mgcp_osmux.c b/openbsc/src/libmgcp/mgcp_osmux.c
index 71e8eae97..33f5721b7 100644
--- a/openbsc/src/libmgcp/mgcp_osmux.c
+++ b/openbsc/src/libmgcp/mgcp_osmux.c
@@ -530,12 +530,20 @@ int osmux_send_dummy(struct mgcp_endpoint *endp)
LOGP(DMGCP, LOGL_ERROR,
"Could not activate osmux in endpoint 0x%x\n",
ENDPOINT_NUMBER(endp));
+ return 0;
}
LOGP(DMGCP, LOGL_ERROR,
"Osmux CID %u for %s:%u is now enabled\n",
endp->osmux.cid, inet_ntoa(endp->net_end.addr),
endp->cfg->osmux_port);
}
+ if(endp->osmux.state != OSMUX_STATE_ENABLED) {
+ LOGP(DMGCP, LOGL_ERROR,
+ "OSMUX dummy to %s CID %u: Osmux not enabled on endpoint 0x%x state %d\n",
+ inet_ntoa(endp->net_end.addr), endp->osmux.cid,
+ ENDPOINT_NUMBER(endp), endp->osmux.state);
+ return 0;
+ }
LOGP(DMGCP, LOGL_DEBUG,
"sending OSMUX dummy load to %s CID %u\n",
inet_ntoa(endp->net_end.addr), endp->osmux.cid);