diff options
author | Aaron An <anjb@ti-net.com.cn> | 2017-01-10 19:54:16 +0800 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2017-01-12 16:55:45 -0600 |
commit | 0047b1bc4962b5051608c8f7a02a8b03ee4d7ec5 (patch) | |
tree | e613a6455b144c33cf647d1b026b2f32be958ddf | |
parent | ac4d6828f5b99ff7de8e14bf33013725c029e248 (diff) |
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
-rw-r--r-- | include/asterisk/rtp_engine.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/asterisk/rtp_engine.h b/include/asterisk/rtp_engine.h index 24af05693..c4a5b6b41 100644 --- a/include/asterisk/rtp_engine.h +++ b/include/asterisk/rtp_engine.h @@ -369,7 +369,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; \ @@ -377,7 +377,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; \ |