[Asterisk-code-review] res rtp asterisk: Fix bug in Function CHANNLE(rtcp, all rtt) (asterisk[13])

Matthew Fredrickson asteriskteam at digium.com
Tue Jan 10 10:33:27 CST 2017


Matthew Fredrickson has uploaded a new change for review. ( https://gerrit.asterisk.org/4708 )

Change subject: res_rtp_asterisk:  Fix bug in Function CHANNLE(rtcp, all_rtt)
......................................................................

res_rtp_asterisk:  Fix bug in Function CHANNLE(rtcp, all_rtt)

Function CHANNEL(rtcp,all_rtt) CHANNEL(rtcp,all_loss) CHANNEL(rtcp,all_jitter)
always return 0.0 due to wrong define of macro "AST_RTP_SATA_SET" and
"AST_RTP_STAT_STRCPY".
It should compare "combined" with "stat" not "current_stat".

ASTERISK-26710 #close
Reported-by: Aaron An
Tested-by: AaronAn

Change-Id: Id4140fafbf92e2db689dac5b17d9caa009028a15
---
M include/asterisk/rtp_engine.h
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/08/4708/1

diff --git a/include/asterisk/rtp_engine.h b/include/asterisk/rtp_engine.h
index 24af056..c4a5b6b 100644
--- a/include/asterisk/rtp_engine.h
+++ b/include/asterisk/rtp_engine.h
@@ -369,7 +369,7 @@
 };
 
 #define AST_RTP_STAT_SET(current_stat, combined, placement, value) \
-if (stat == current_stat || stat == AST_RTP_INSTANCE_STAT_ALL || (combined >= 0 && combined == current_stat)) { \
+if (stat == current_stat || stat == AST_RTP_INSTANCE_STAT_ALL || (combined >= 0 && combined == stat)) { \
 placement = value; \
 if (stat == current_stat) { \
 return 0; \
@@ -377,7 +377,7 @@
 }
 
 #define AST_RTP_STAT_STRCPY(current_stat, combined, placement, value) \
-if (stat == current_stat || stat == AST_RTP_INSTANCE_STAT_ALL || (combined >= 0 && combined == current_stat)) { \
+if (stat == current_stat || stat == AST_RTP_INSTANCE_STAT_ALL || (combined >= 0 && combined == stat)) { \
 	ast_copy_string(placement, value, sizeof(placement)); \
 	if (stat == current_stat) { \
 		return 0; \

-- 
To view, visit https://gerrit.asterisk.org/4708
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id4140fafbf92e2db689dac5b17d9caa009028a15
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Matthew Fredrickson <creslin at digium.com>
Gerrit-Reviewer: Aaron An <anjb at ti-net.com.cn>



More information about the asterisk-code-review mailing list