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

Emmanuel BUU asteriskteam at digium.com
Tue Aug 21 08:04:31 CDT 2018


Emmanuel BUU has uploaded this change for review. ( 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 regularily and sends text frames even if
buffer is empty. This causes a a lot of unecessary traces. The fix
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(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/79/9979/1

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: newchange
Gerrit-Change-Id: Icf81310c3b8080b615a42060afc02ab41f9523dd
Gerrit-Change-Number: 9979
Gerrit-PatchSet: 1
Gerrit-Owner: Emmanuel BUU <emmanuel.buu at ives.fr>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180821/d976e5ad/attachment.html>


More information about the asterisk-code-review mailing list