Change in osmo-mgw[master]: osmux: cleanup misleading code calling rtp_bridge_cb
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29566 ) Change subject: osmux: cleanup misleading code calling rtp_bridge_cb ...................................................................... osmux: cleanup misleading code calling rtp_bridge_cb Documentation of rtp_bridge_cb was outdated, and caused confusion when adding initial osmux support. Let's clear all the mess. Change-Id: I42d1f2e2919eae3b1555ca4929e571855960792e --- M include/osmocom/mgcp/mgcp_endp.h M src/libosmo-mgcp/mgcp_network.c M src/libosmo-mgcp/mgcp_osmux.c 3 files changed, 12 insertions(+), 19 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/66/29566/1 diff --git a/include/osmocom/mgcp/mgcp_endp.h b/include/osmocom/mgcp/mgcp_endp.h index 91c4551..b130050 100644 --- a/include/osmocom/mgcp/mgcp_endp.h +++ b/include/osmocom/mgcp/mgcp_endp.h @@ -40,8 +40,13 @@ endp ? endp->name : "none", \ ## args) +enum rtp_proto { + MGCP_PROTO_RTP, + MGCP_PROTO_RTCP, +}; + struct osmo_rtp_msg_ctx { - int proto; + enum rtp_proto proto; struct mgcp_conn_rtp *conn_src; struct osmo_sockaddr *from_addr; }; diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index d492563..a3c245a 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -54,11 +54,6 @@ #define RTP_MAX_DROPOUT 3000 #define RTP_MAX_MISORDER 100 -enum rtp_proto { - MGCP_PROTO_RTP, - MGCP_PROTO_RTCP, -}; - void rtpconn_rate_ctr_add(struct mgcp_conn_rtp *conn_rtp, struct mgcp_endpoint *endp, int id, int inc) { @@ -1278,13 +1273,12 @@ return 0; } -/*! dispatch incoming RTP packet to opposite RTP connection. - * \param[in] proto protocol (MGCP_CONN_TYPE_RTP or MGCP_CONN_TYPE_RTCP). - * \param[in] addr socket address where the RTP packet has been received from. - * \param[in] buf buffer that hold the RTP payload. - * \param[in] buf_size size data length of buf. - * \param[in] conn originating connection. - * \returns 0 on success, -1 on ERROR. */ +/*! Dispatch incoming RTP packet to opposite RTP connection. + * \param[in] msg Message buffer to bridge, coming from source connection. + * msg shall contain "struct osmo_rtp_msg_ctx *" attached in + * "OSMO_RTP_MSG_CTX(msg)". + * \returns 0 on success, -1 on ERROR. + */ int mgcp_dispatch_rtp_bridge_cb(struct msgb *msg) { struct osmo_rtp_msg_ctx *mc = OSMO_RTP_MSG_CTX(msg); diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 37ab193..652eea7 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -283,12 +283,6 @@ return NULL; } -/* FIXME: this is declared and used in mgcp_network.c, but documentation of mgcp_dispatch_rtp_bridge_cb() states another enum is to be used */ -enum { - MGCP_PROTO_RTP, - MGCP_PROTO_RTCP, -}; - static void scheduled_from_osmux_tx_rtp_cb(struct msgb *msg, void *data) { struct mgcp_conn_rtp *conn = data; -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29566 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I42d1f2e2919eae3b1555ca4929e571855960792e Gerrit-Change-Number: 29566 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin@sysmocom.de> Gerrit-MessageType: newchange
participants (1)
-
pespin