mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-10-23 08:12:01 +00:00
osmux: allow enabling osmux only on correct activating state
State ACTIVATING is set once negotiation between the 2 parts went successfuly. Port from openbsc 96bd7b075a59eb051079152241b127ca944b0781. Change-Id: Ic56eda1251be41369d869e687a1cf955df2c6d61
This commit is contained in:
@@ -536,9 +536,9 @@ int osmux_enable_conn(struct mgcp_endpoint *endp, struct mgcp_conn_rtp *conn,
|
||||
uint16_t osmux_dummy = endp->cfg->osmux_dummy;
|
||||
|
||||
/* Check if osmux is enabled for the specified connection */
|
||||
if (conn->osmux.state == OSMUX_STATE_DISABLED) {
|
||||
LOGP(DLMGCP, LOGL_ERROR, "OSMUX not enabled for conn:%s\n",
|
||||
mgcp_conn_dump(conn->conn));
|
||||
if (conn->osmux.state != OSMUX_STATE_ACTIVATING) {
|
||||
LOGP(DLMGCP, LOGL_ERROR, "conn:%s didn't negotiate Osmux, state %d\n",
|
||||
mgcp_conn_dump(conn->conn), conn->osmux.state);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user