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
This commit is contained in:
Pau Espin 2022-10-24 17:55:02 +02:00
parent 58c0b0a6f7
commit 6db3f7f1cb
1 changed files with 13 additions and 6 deletions

View File

@ -982,9 +982,16 @@ static int check_rtp(struct mgcp_conn_rtp *conn_src, struct msgb *msg)
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 @@ int mgcp_dispatch_rtp_bridge_cb(struct msgb *msg)
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 @@ int mgcp_dispatch_rtp_bridge_cb(struct msgb *msg)
}
/* 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 @@ int mgcp_dispatch_e1_bridge_cb(struct msgb *msg)
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 */