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
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 */