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

George Joseph asteriskteam at digium.com
Tue Aug 28 09:15:21 CDT 2018


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

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
  Joshua Colp: Looks good to me, but someone else must approve
  Matthew Fredrickson: 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 6f7e09e..e562627 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -6058,7 +6058,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/9979
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: merged
Gerrit-Change-Id: Icf81310c3b8080b615a42060afc02ab41f9523dd
Gerrit-Change-Number: 9979
Gerrit-PatchSet: 2
Gerrit-Owner: Emmanuel BUU <emmanuel.buu at ives.fr>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matthew Fredrickson <creslin at digium.com>
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/3cbc2b71/attachment-0001.html>


More information about the asterisk-code-review mailing list