[Asterisk-code-review] res_pjsip: prevent crash on websocket disconnect (asterisk[18])

Joshua Colp asteriskteam at digium.com
Mon Oct 17 08:58:42 CDT 2022


Attention is currently required from: Michael Bradeen, George Joseph.

Joshua Colp has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/19413 )

Change subject: res_pjsip: prevent crash on websocket disconnect
......................................................................


Patch Set 1:

(2 comments)

File res/res_pjsip.c:

https://gerrit.asterisk.org/c/asterisk/+/19413/comment/38a0e33f_7db2b67b 
PS1, Line 2288: 		clean_contact_from_tdata(tdata);
> I don't think this is a good idea. […]
I don't think this is the right review to have such a discussion since it was behaving this way already for quite some time.


https://gerrit.asterisk.org/c/asterisk/+/19413/comment/7ee376b1_c0687498 
PS1, Line 2317: 	pj_grp_lock_dec_ref(tsx_glock);
> I'm not quite understanding. […]
The monitor thread can be executing a scheduled item due to the disconnection of the underlying socket. This trickles up to the transaction, causing the transaction to clean things up and be destroyed (without this code). By keeping the group lock incremented for the duration of this function it ensures that the transaction isn't destroyed. It won't get destroyed until the group lock goes away.



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

Gerrit-Project: asterisk
Gerrit-Branch: 18
Gerrit-Change-Id: Id050fded2247a04d8f0fc5b8a2cf3e5482cb8cee
Gerrit-Change-Number: 19413
Gerrit-PatchSet: 1
Gerrit-Owner: Michael Bradeen <mbradeen at sangoma.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-CC: Joshua Colp <jcolp at sangoma.com>
Gerrit-Attention: Michael Bradeen <mbradeen at sangoma.com>
Gerrit-Attention: George Joseph <gjoseph at digium.com>
Gerrit-Comment-Date: Mon, 17 Oct 2022 13:58:42 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: George Joseph <gjoseph at digium.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20221017/9fadd068/attachment.html>


More information about the asterisk-code-review mailing list