Change in osmo-mgw[master]: mgw: Rename s/mgcp_send_rtp/mgcp_conn_rtp_dispatch_rtp/
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29865 ) Change subject: mgw: Rename s/mgcp_send_rtp/mgcp_conn_rtp_dispatch_rtp/ ...................................................................... mgw: Rename s/mgcp_send_rtp/mgcp_conn_rtp_dispatch_rtp/ The previous name is misleading since the function is not really sending stuff over a socket, but rather handling/dispatching the incoming message internally (and finally later it may be sent over a socket under some conditions). Change-Id: Idaf791997b8438a4aede50f614afa0d55ad41faa --- M src/libosmo-mgcp/mgcp_network.c 1 file changed, 13 insertions(+), 6 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, approved diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index 432c2b1..6edb4ae 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -982,9 +982,16 @@ return 0; } -/* Send RTP data. Possible options are standard RTP packet - * transmission or trsmission via an osmux connection */ -static int mgcp_send_rtp(struct mgcp_conn_rtp *conn_dst, struct msgb *msg) +/*! Dispatch msg bridged from the sister conn in the endpoint. + * \param[in] conn_dst The destination conn that should handle and transmit the content to + * its peer outside MGW. + * \param[in] msg msgb containing an RTP pkt received by the sister conn in the endpoint, + * \returns bytes sent, -1 on error. + * + * Possible options are standard RTP packet transmission, transmission + * via IuUP or transmission via an osmux connection. + */ +static int mgcp_conn_rtp_dispatch_rtp(struct mgcp_conn_rtp *conn_dst, struct msgb *msg) { struct osmo_rtp_msg_ctx *mc = OSMO_RTP_MSG_CTX(msg); enum rtp_proto proto = mc->proto; @@ -1315,7 +1322,7 @@ osmo_sockaddr_ntop(&from_addr->u.sa, ipbuf), osmo_sockaddr_port(&conn->u.rtp.end.addr.u.sa)); } - return mgcp_send_rtp(conn_src, msg); + return mgcp_conn_rtp_dispatch_rtp(conn_src, msg); } /* Find a destination connection. */ @@ -1347,7 +1354,7 @@ } /* Dispatch RTP packet to destination RTP connection */ - return mgcp_send_rtp(&conn_dst->u.rtp, msg); + return mgcp_conn_rtp_dispatch_rtp(&conn_dst->u.rtp, msg); } /*! dispatch incoming RTP packet to E1 subslot, handle RTCP packets locally. @@ -1380,7 +1387,7 @@ osmo_sockaddr_ntop(&from_addr->u.sa, ipbuf), osmo_sockaddr_port(&conn->u.rtp.end.addr.u.sa)); } - return mgcp_send_rtp(conn_src, msg); + return mgcp_conn_rtp_dispatch_rtp(conn_src, msg); } /* Forward to E1 */ -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29865 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: Idaf791997b8438a4aede50f614afa0d55ad41faa Gerrit-Change-Number: 29865 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier@sysmocom.de> Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-Reviewer: neels <nhofmeyr@sysmocom.de> Gerrit-Reviewer: osmith <osmith@sysmocom.de> Gerrit-Reviewer: pespin <pespin@sysmocom.de> Gerrit-MessageType: merged
participants (1)
-
pespin