[Asterisk-code-review] res/res rtp asterisk: remove debug traces generated by an em... (asterisk[15])

George Joseph asteriskteam at digium.com
Tue Aug 28 09:14:34 CDT 2018


George Joseph has submitted this change and it was merged. ( https://gerrit.asterisk.org/10007 )

Change subject: res/res_rtp_asterisk: remove debug traces generated by an empty frame
......................................................................

res/res_rtp_asterisk: remove debug traces generated by an empty frame

The realtime text timer pops regularly and sends text frames even if
the buffer is empty. This causes a lot of unecessary debug logging.

* Made red_write() test if we need to send a frame before calling
ast_rtp_write()

ASTERISK-28002
Reported by: Emmanuel BUU
Tested by: Emmanuel BUU

Change-Id: Icf81310c3b8080b615a42060afc02ab41f9523dd
---
M res/res_rtp_asterisk.c
1 file changed, 3 insertions(+), 1 deletion(-)

Approvals:
  Richard Mudgett: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved; Approved for Submit



diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index fa9e325..c1aa275 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -7382,7 +7382,9 @@
 	struct ast_rtp *rtp = ast_rtp_instance_get_data(instance);
 
 	ao2_lock(instance);
-	ast_rtp_write(instance, &rtp->red->t140);
+	if (rtp->red->t140.datalen > 0) {
+		ast_rtp_write(instance, &rtp->red->t140);
+	}
 	ao2_unlock(instance);
 
 	return 1;

-- 
To view, visit https://gerrit.asterisk.org/10007
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: merged
Gerrit-Change-Id: Icf81310c3b8080b615a42060afc02ab41f9523dd
Gerrit-Change-Number: 10007
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Emmanuel BUU <emmanuel.buu at ives.fr>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180828/0dc980e0/attachment.html>


More information about the asterisk-code-review mailing list