Skip to content
Snippets Groups Projects
Commit e0e502d9 authored by Aaron An's avatar Aaron An Committed by Joshua Colp
Browse files

res_rtp_asterisk: Fix bug in function CHANNEL(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
parent c2d42303
No related branches found
No related tags found
No related merge requests found
......@@ -373,7 +373,7 @@ struct ast_rtp_instance_stats {
};
#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; \
......@@ -381,7 +381,7 @@ return 0; \
}
#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; \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment