summaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-10-12 19:54:23 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2018-10-12 20:20:30 +0200
commit96bd7b075a59eb051079152241b127ca944b0781 (patch)
tree6f01d617234d041f731a9b2f5c891f3f913f65d0 /openbsc
parent8f321179747f64819d940d72d0212192f69284ca (diff)
mgcp: osmux: allow enabling osmux only on correct activating state
State ACTIVATING is set once negotiation between the 2 parts went successfuly. Change-Id: I21eb30fa8d48f3d592ff197bd74e673fdac51c1d
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/src/libmgcp/mgcp_osmux.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/openbsc/src/libmgcp/mgcp_osmux.c b/openbsc/src/libmgcp/mgcp_osmux.c
index b46ea1078..6be5eb222 100644
--- a/openbsc/src/libmgcp/mgcp_osmux.c
+++ b/openbsc/src/libmgcp/mgcp_osmux.c
@@ -452,9 +452,9 @@ int osmux_enable_endpoint(struct mgcp_endpoint *endp, struct in_addr *addr, uint
*/
static const uint32_t rtp_ssrc_winlen = UINT32_MAX / (OSMUX_CID_MAX + 1);
- if (endp->osmux.state == OSMUX_STATE_DISABLED) {
- LOGP(DMGCP, LOGL_ERROR, "Endpoint 0x%x didn't request Osmux\n",
- ENDPOINT_NUMBER(endp));
+ if (endp->osmux.state != OSMUX_STATE_ACTIVATING) {
+ LOGP(DMGCP, LOGL_ERROR, "Endpoint 0x%x didn't negotiate Osmux, state %d\n",
+ ENDPOINT_NUMBER(endp), endp->osmux.state);
return -1;
}