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

Michael Bradeen asteriskteam at digium.com
Thu Oct 27 19:04:56 CDT 2022


Attention is currently required from: Joshua Colp, George Joseph, Richard Mudgett.

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

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


Patch Set 4:

(7 comments)

Commit Message:

https://gerrit.asterisk.org/c/asterisk/+/19413/comment/64cf162b_ee1f3b1a 
PS2, Line 20: the contact will not be cleaned up properly, see:ASTERISK-29286. As a
> You should not reference other issues than what the patch directly fixes with an accurate JIRA tag. […]
Done


File res/res_pjsip.c:

https://gerrit.asterisk.org/c/asterisk/+/19413/comment/1a473a60_08b2e325 
PS1, Line 2288: 		clean_contact_from_tdata(tdata);
> I don't think this is the right review to have such a discussion since it was behaving this way alre […]
Done


https://gerrit.asterisk.org/c/asterisk/+/19413/comment/328912e5_dc170b51 
PS1, Line 2317: 	pj_grp_lock_dec_ref(tsx_glock);
> The monitor thread can be executing a scheduled item due to the disconnection of the underlying sock […]
Done


File res/res_pjsip.c:

https://gerrit.asterisk.org/c/asterisk/+/19413/comment/23753a0d_95467d45 
PS3, Line 2283: 	pool = pjsip_endpt_create_pool(ast_sip_get_pjsip_endpoint(), "stateful response", 256, 256);
> where did the 256 come from?
changed to match what pjsip was doing previously when we weren't creating the pool or lock.


https://gerrit.asterisk.org/c/asterisk/+/19413/comment/52489abb_3c22fd8d 
PS3, Line 2292: 	if(pj_grp_lock_create_w_handler(pool, NULL, pool, &pool_destroy_callback, &tsx_glock) != PJ_SUCCESS) {
> if ( […]
Done


https://gerrit.asterisk.org/c/asterisk/+/19413/comment/835b41d6_66b02a7b 
PS3, Line 2298: 	if(pj_grp_lock_add_ref(tsx_glock) != PJ_SUCCESS) {
> if ( […]
as it always returns PJ_SUCCESS, removing failure code


https://gerrit.asterisk.org/c/asterisk/+/19413/comment/37f4fb4d_2a1ccd32 
PS3, Line 2304: 		clean_contact_from_tdata(tdata);
> should the grp lock ref be decremented here? what happens to the pool?
Done



-- 
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: 4
Gerrit-Owner: Michael Bradeen <mbradeen at sangoma.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Attention: Joshua Colp <jcolp at sangoma.com>
Gerrit-Attention: George Joseph <gjoseph at digium.com>
Gerrit-Attention: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Fri, 28 Oct 2022 00:04:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Joshua Colp <jcolp at sangoma.com>
Comment-In-Reply-To: George Joseph <gjoseph at digium.com>
Comment-In-Reply-To: Richard Mudgett <rmudgett at digium.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20221028/867a7f39/attachment.html>


More information about the asterisk-code-review mailing list