aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmgcp
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2013-11-25 12:53:29 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-11-25 18:13:35 +0100
commitd62419b574f7002b1c857d9e2df72a95daca36f1 (patch)
tree1971b7a0aceaa7fa92f86fff235a64eb09b8f1a1 /openbsc/src/libmgcp
parent50079a18434836fc6193f7d8ee30aeda6adbf872 (diff)
mgcp/rtp: Add test case for RTP timestamp patching and stats
This patch adds a test case to check, whether RTP timestamps are generated properly after SSRC changes and whether the error counters work properly. Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/src/libmgcp')
-rw-r--r--openbsc/src/libmgcp/mgcp_network.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/openbsc/src/libmgcp/mgcp_network.c b/openbsc/src/libmgcp/mgcp_network.c
index 6966be64..72d0a5c3 100644
--- a/openbsc/src/libmgcp/mgcp_network.c
+++ b/openbsc/src/libmgcp/mgcp_network.c
@@ -209,9 +209,9 @@ static int check_rtp_timestamp(struct mgcp_endpoint *endp,
* There is also no probation period for new sources. Every package
* we receive will be seen as a switch in streams.
*/
-static void patch_and_count(struct mgcp_endpoint *endp, struct mgcp_rtp_state *state,
- struct mgcp_rtp_end *rtp_end, struct sockaddr_in *addr,
- char *data, int len)
+void mgcp_patch_and_count(struct mgcp_endpoint *endp, struct mgcp_rtp_state *state,
+ struct mgcp_rtp_end *rtp_end, struct sockaddr_in *addr,
+ char *data, int len)
{
uint32_t arrival_time;
int32_t transit, d;
@@ -369,9 +369,9 @@ static int mgcp_send(struct mgcp_endpoint *endp, int dest, int is_rtp,
if (dest == MGCP_DEST_NET) {
if (is_rtp) {
- patch_and_count(endp, &endp->bts_state,
- &endp->net_end,
- addr, buf, rc);
+ mgcp_patch_and_count(endp, &endp->bts_state,
+ &endp->net_end,
+ addr, buf, rc);
forward_data(endp->net_end.rtp.fd,
&endp->taps[MGCP_TAP_NET_OUT], buf, rc);
return mgcp_udp_send(endp->net_end.rtp.fd,
@@ -384,9 +384,9 @@ static int mgcp_send(struct mgcp_endpoint *endp, int dest, int is_rtp,
}
} else {
if (is_rtp) {
- patch_and_count(endp, &endp->net_state,
- &endp->bts_end,
- addr, buf, rc);
+ mgcp_patch_and_count(endp, &endp->net_state,
+ &endp->bts_end,
+ addr, buf, rc);
forward_data(endp->bts_end.rtp.fd,
&endp->taps[MGCP_TAP_BTS_OUT], buf, rc);
return mgcp_udp_send(endp->bts_end.rtp.fd,