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

N A asteriskteam at digium.com
Mon Jan 17 15:31:47 CST 2022


N A has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/17889 )


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(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/89/17889/1

diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index 5fdcefe..7024081 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/+/17889
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 18
Gerrit-Change-Id: Ib7098c947c63537d087a03b4646199fbb963f8e1
Gerrit-Change-Number: 17889
Gerrit-PatchSet: 1
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220117/d35fe43c/attachment-0001.html>


More information about the asterisk-code-review mailing list