[Asterisk-code-review] res_pjsip_sdp_rtp: Improve detecting of lack of RTP activity (asterisk[16])

Joshua Colp asteriskteam at digium.com
Thu Mar 10 06:06:56 CST 2022


Attention is currently required from: Boris P. Korzun.
Joshua Colp has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/18071 )

Change subject: res_pjsip_sdp_rtp: Improve detecting of lack of RTP activity
......................................................................


Patch Set 2: Code-Review-1

(3 comments)

File res/res_pjsip_sdp_rtp.c:

https://gerrit.asterisk.org/c/asterisk/+/18071/comment/224e7d32_a88785df 
PS1, Line 124: 	timeout = ast_rtp_instance_get_timeout(rtp);
> timeout is used twice later […]
You retrieve the value of timeout, and then do this check:

        if (ast_channel_state(chan) != AST_STATE_UP || !ast_sockaddr_isnull(&session_media->direct_media_addr)) {

That code block doesn't use timeout. You can therefore move the timeout retrieve to after the if, to before it is actually used.


https://gerrit.asterisk.org/c/asterisk/+/18071/comment/54db4328_3f14db00 
PS1, Line 129: 		ast_rtp_instance_set_last_rx(rtp, now);
> Done
The indentation of this is not correct


https://gerrit.asterisk.org/c/asterisk/+/18071/comment/9ea1c065_799d86d8 
PS1, Line 131: 		return timeout * 500; /* recheck after half timeout */
> Avoiding possible races and faster reacting to cases while there is no a RTP at all.
Comment this with the code



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

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I07326d5b9c40f25db717fd6075f6f3a8d77279eb
Gerrit-Change-Number: 18071
Gerrit-PatchSet: 2
Gerrit-Owner: Boris P. Korzun <drtr0jan at yandex.ru>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Attention: Boris P. Korzun <drtr0jan at yandex.ru>
Gerrit-Comment-Date: Thu, 10 Mar 2022 12:06:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Joshua Colp <jcolp at sangoma.com>
Comment-In-Reply-To: Boris P. Korzun <drtr0jan at yandex.ru>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220310/885e78ea/attachment.html>


More information about the asterisk-code-review mailing list