From 14f8a08f44aec066f62ffe168c6867f9c0479d02 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Mon, 13 May 2019 13:10:06 +0200 Subject: [PATCH] osmux: Drop unneeded OSMUX_STATE_NEGOTIATING Change-Id: I94e7df3287d037975adc16c5ada05adf94269ead --- include/osmocom/mgcp/osmux.h | 1 - src/libosmo-mgcp/mgcp_protocol.c | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/include/osmocom/mgcp/osmux.h b/include/osmocom/mgcp/osmux.h index c080c8532..eb0561075 100644 --- a/include/osmocom/mgcp/osmux.h +++ b/include/osmocom/mgcp/osmux.h @@ -28,7 +28,6 @@ int osmux_cid_pool_count_used(void); enum osmux_state { OSMUX_STATE_DISABLED = 0, /* Osmux not being currently used by endp */ - OSMUX_STATE_NEGOTIATING, /* Osmux was locally requested in MGCP CRCX */ OSMUX_STATE_ACTIVATING, /* Osmux was accepted in MGCP CRCX ACK. It can now be enabled by \ref osmux_enable_endpoint. */ OSMUX_STATE_ENABLED, /* Osmux was initialized by \ref osmux_enable_endpoint and can process frames */ }; diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 555d6c644..609b5fb10 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -327,7 +327,6 @@ static struct msgb *create_response_with_sdp(struct mgcp_endpoint *endp, rc = msgb_printf(sdp, "X-Osmux: %u\r\n", conn->osmux.cid); if (rc < 0) goto error; - conn->osmux.state = OSMUX_STATE_ACTIVATING; } /* Attach line break to separate the parameters from the SDP block */ @@ -918,7 +917,7 @@ mgcp_header_done: * is fully set up from the dummy load. */ conn->osmux.state = OSMUX_STATE_DISABLED; if (osmux_cid >= -1) { /* -1 is wilcard, alloc next avail CID */ - conn->osmux.state = OSMUX_STATE_NEGOTIATING; + conn->osmux.state = OSMUX_STATE_ACTIVATING; if (conn_osmux_allocate_cid(conn, osmux_cid) == -1) { rate_ctr_inc(&rate_ctrs->ctr[MGCP_CRCX_FAIL_NO_OSMUX]); goto error2;