pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/29568 )

Change subject: osmux: Unify rtp_conn osmux type into a single type
......................................................................

osmux: Unify rtp_conn osmux type into a single type

There's no need to separate between BSS and CN side nowadays, the
different types are used nowehere. This separation dates from
osmo-bsc-nat code days.

Change-Id: I65effeddf033eb1955553e8d659c593b4e67f7bc
---
M include/osmocom/mgcp/mgcp_conn.h
M src/libosmo-mgcp/mgcp_iuup.c
M src/libosmo-mgcp/mgcp_network.c
M src/libosmo-mgcp/mgcp_osmux.c
M src/libosmo-mgcp/mgcp_protocol.c
5 files changed, 7 insertions(+), 11 deletions(-)

Approvals:
  laforge: Looks good to me, but someone else must approve
  osmith: Looks good to me, but someone else must approve
  pespin: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/osmocom/mgcp/mgcp_conn.h b/include/osmocom/mgcp/mgcp_conn.h
index d9b38c0..7ac40ab 100644
--- a/include/osmocom/mgcp/mgcp_conn.h
+++ b/include/osmocom/mgcp/mgcp_conn.h
@@ -46,8 +46,7 @@
 /* Specific rtp connection type (see struct mgcp_conn_rtp) */
 enum mgcp_conn_rtp_type {
        MGCP_RTP_DEFAULT        = 0,
-       MGCP_OSMUX_BSC,
-       MGCP_OSMUX_BSC_NAT,
+       MGCP_RTP_OSMUX,
        MGCP_RTP_IUUP,
 };

@@ -224,7 +223,7 @@

 /* Was conn configured to handle Osmux? */
 static inline bool mgcp_conn_rtp_is_osmux(const struct mgcp_conn_rtp *conn) {
-       return conn->type == MGCP_OSMUX_BSC || conn->type == MGCP_OSMUX_BSC_NAT;
+       return conn->type == MGCP_RTP_OSMUX;
 }

 /* Was conn configured to handle Osmux? */
diff --git a/src/libosmo-mgcp/mgcp_iuup.c b/src/libosmo-mgcp/mgcp_iuup.c
index 142b002..48e4ce7 100644
--- a/src/libosmo-mgcp/mgcp_iuup.c
+++ b/src/libosmo-mgcp/mgcp_iuup.c
@@ -342,8 +342,7 @@
                return bridge_iuup_to_iuup_peer(conn_rtp_src, conn_rtp_dst, 
irp);
        case MGCP_RTP_DEFAULT:
                return bridge_iuup_to_rtp_peer(conn_rtp_src, conn_rtp_dst, irp);
-       case MGCP_OSMUX_BSC:
-       case MGCP_OSMUX_BSC_NAT:
+       case MGCP_RTP_OSMUX:
        default:
                LOGPCONN(conn_rtp_src->conn, DRTP, LOGL_ERROR,
                         "Forward of IuUP payload to RTP connection type %u not 
supported!\n",
diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c
index a3c245a..5246160 100644
--- a/src/libosmo-mgcp/mgcp_network.c
+++ b/src/libosmo-mgcp/mgcp_network.c
@@ -1013,10 +1013,9 @@
                         "using mgcp_send() to forward data directly\n");
                return mgcp_send(endp, proto == MGCP_PROTO_RTP,
                                 mc->from_addr, msg, conn_src, conn_dst);
-       case MGCP_OSMUX_BSC_NAT:
-       case MGCP_OSMUX_BSC:
+       case MGCP_RTP_OSMUX:
                LOGPENDP(endp, DRTP, LOGL_DEBUG,
-                        "endpoint type is MGCP_OSMUX_BSC_NAT, "
+                        "endpoint type is MGCP_RTP_OSMUX, "
                         "using osmux_xfrm_to_osmux() to forward data through 
OSMUX\n");
                return osmux_xfrm_to_osmux((char*)msgb_data(msg), 
msgb_length(msg), conn_dst);
        case MGCP_RTP_IUUP:
diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c
index 85ba655b..abd4f32 100644
--- a/src/libosmo-mgcp/mgcp_osmux.c
+++ b/src/libosmo-mgcp/mgcp_osmux.c
@@ -611,7 +611,7 @@

        conn->osmux.local_cid = (uint8_t) osmux_cid;
        conn->osmux.local_cid_allocated = true;
-       conn->type = MGCP_OSMUX_BSC;
+       conn->type = MGCP_RTP_OSMUX;
        return osmux_cid;
 }

diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c
index 711ca31..79fbc53 100644
--- a/src/libosmo-mgcp/mgcp_protocol.c
+++ b/src/libosmo-mgcp/mgcp_protocol.c
@@ -150,8 +150,7 @@

        switch (conn->type) {
        case MGCP_RTP_DEFAULT:
-       case MGCP_OSMUX_BSC:
-       case MGCP_OSMUX_BSC_NAT:
+       case MGCP_RTP_OSMUX:
        case MGCP_RTP_IUUP:
                break;
        default:

--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29568
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I65effeddf033eb1955553e8d659c593b4e67f7bc
Gerrit-Change-Number: 29568
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pes...@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <lafo...@osmocom.org>
Gerrit-Reviewer: osmith <osm...@sysmocom.de>
Gerrit-Reviewer: pespin <pes...@sysmocom.de>
Gerrit-MessageType: merged

Reply via email to