mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-10-23 08:12:01 +00:00
osmux: Move setting OSMUX_STATE_DISABLED to initializer function
Change-Id: I7c184b17075fc3e71f1f66775e16b56a5ae91b62
This commit is contained in:
@@ -95,6 +95,9 @@ static int mgcp_rtp_conn_init(struct mgcp_conn_rtp *conn_rtp, struct mgcp_conn *
|
||||
static atomic_uint rate_ctr_index = 0;
|
||||
|
||||
conn_rtp->type = MGCP_RTP_DEFAULT;
|
||||
|
||||
/* Osmux specific defaults, only used if conn is later on Osmux-enabled: */
|
||||
conn_rtp->osmux.state = OSMUX_STATE_DISABLED;
|
||||
conn_rtp->osmux.local_cid_allocated = false;
|
||||
conn_rtp->osmux.local_cid = 0;
|
||||
conn_rtp->osmux.remote_cid_present = false;
|
||||
|
@@ -524,6 +524,8 @@ int osmux_init_conn(struct mgcp_conn_rtp *conn)
|
||||
conn->osmux.ctrg = rate_ctr_group_alloc(conn->conn, &rate_ctr_group_osmux_desc, conn->ctrg->idx);
|
||||
|
||||
conn->type = MGCP_RTP_OSMUX;
|
||||
/* Annotate Osmux circuit ID and set it to negotiating state until this
|
||||
* is fully set up from the dummy load. */
|
||||
conn->osmux.state = OSMUX_STATE_ACTIVATING;
|
||||
return 0;
|
||||
}
|
||||
|
@@ -1003,9 +1003,6 @@ mgcp_header_done:
|
||||
goto error2;
|
||||
}
|
||||
|
||||
/* Annotate Osmux circuit ID and set it to negotiating state until this
|
||||
* is fully set up from the dummy load. */
|
||||
conn->osmux.state = OSMUX_STATE_DISABLED;
|
||||
/* If X-Osmux (remote CID) was received (-1 is wilcard), alloc next avail CID as local CID */
|
||||
if (remote_osmux_cid >= -1) {
|
||||
if (osmux_init_conn(conn) < 0) {
|
||||
|
Reference in New Issue
Block a user