From 0ee8d73c87beb630adc806ec360cbf655f68a878 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Mon, 28 Jan 2019 11:09:44 +0100 Subject: [PATCH] rtp: improve debugging output --- lib/nodes/rtp.c | 8 ++++---- tests/integration/pipe-loopback-rtp.sh | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/nodes/rtp.c b/lib/nodes/rtp.c index dd3c86875..f6ff4c7d8 100644 --- a/lib/nodes/rtp.c +++ b/lib/nodes/rtp.c @@ -75,6 +75,8 @@ static int rtp_set_rate(struct node *n, double rate) return -1; } + debug(5, "Set rate limiting for node %s to %f", node_name(n), rate); + return 0; } @@ -90,8 +92,6 @@ static int rtp_aimd(struct node *n, double loss_frac) else rate = r->aimd.last_rate * r->aimd.b; - debug(5, "Set rate limiting for node %s to %f", node_name(n), rate); - r->aimd.last_rate = rate; ret = rtp_set_rate(n, rate); @@ -301,12 +301,12 @@ static void rtcp_handler(const struct sa *src, struct rtcp_msg *msg, void *arg) /* source not used */ (void) src; - debug(5, "rtcp: recv %s\n", rtcp_type_name(msg->hdr.pt)); + debug(5, "rtcp: recv %s", rtcp_type_name(msg->hdr.pt)); if (msg->hdr.pt == RTCP_SR) { if(msg->hdr.count > 0) { const struct rtcp_rr *rr = &msg->r.sr.rrv[0]; - debug(5, "rtp: fraction lost = %d\n", rr->fraction); + debug(5, "rtp: fraction lost = %d", rr->fraction); rtp_aimd(n, rr->fraction); } else diff --git a/tests/integration/pipe-loopback-rtp.sh b/tests/integration/pipe-loopback-rtp.sh index 1414c992b..b9c45015b 100755 --- a/tests/integration/pipe-loopback-rtp.sh +++ b/tests/integration/pipe-loopback-rtp.sh @@ -40,6 +40,9 @@ VECTORIZE="1" cat > ${CONFIG_FILE} << EOF { + "logging" : { + "level" : "debug" + }, "nodes" : { "node1" : { "type" : "rtp",