[Asterisk-code-review] res_rtp_asterisk: Fix typo in flag test/set (asterisk[16])

Friendly Automation asteriskteam at digium.com
Wed Jan 19 08:46:50 CST 2022


Friendly Automation has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/17888 )

Change subject: res_rtp_asterisk: Fix typo in flag test/set
......................................................................

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
---
M res/res_rtp_asterisk.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Sean Bright: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved
  Friendly Automation: Approved for Submit



diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index f810501..da50072 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -5757,7 +5757,7 @@
 			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);

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/17888
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: Ib7098c947c63537d087a03b4646199fbb963f8e1
Gerrit-Change-Number: 17888
Gerrit-PatchSet: 1
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Sean Bright <sean at seanbright.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220119/b50ad6c6/attachment.html>


More information about the asterisk-code-review mailing list