From: Naveen Albert Date: Tue, 11 Jan 2022 18:46:08 +0000 (+0000) Subject: res_rtp_asterisk: Fix typo in flag test/set X-Git-Tag: 16.24.0-rc1~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=67a87c01ff38d52fc8a9b41fd3e703bf55a51eea;p=thirdparty%2Fasterisk.git res_rtp_asterisk: Fix typo in flag test/set The code currently checks to see if an RFC3389 warning flag is set, except if it is, it merely sets the flag again, the logic of which doesn't make any sense. This adjusts the if comparison to check if the flag has NOT been set, and if so, emit a notice log event and set the flag so that future frames do not cause an event to be logged. ASTERISK-29856 #close Change-Id: Ib7098c947c63537d087a03b4646199fbb963f8e1 --- diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c index f8105010c6..da50072dce 100644 --- a/res/res_rtp_asterisk.c +++ b/res/res_rtp_asterisk.c @@ -5757,7 +5757,7 @@ static struct ast_frame *process_cn_rfc3389(struct ast_rtp_instance *instance, u ast_format_get_name(rtp->lastrxformat), len); } - if (ast_test_flag(rtp, FLAG_3389_WARNING)) { + if (!ast_test_flag(rtp, FLAG_3389_WARNING)) { struct ast_sockaddr remote_address = { {0,} }; ast_rtp_instance_get_remote_address(instance, &remote_address);