[Asterisk-code-review] channels/chan pjsip: fix deadlock in response retransmissions (asterisk[13])

Richard Mudgett asteriskteam at digium.com
Wed Jul 25 09:33:30 CDT 2018


Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/9477 )

Change subject: channels/chan_pjsip: fix deadlock in response retransmissions
......................................................................


Patch Set 7: Code-Review-1

(2 comments)

https://gerrit.asterisk.org/#/c/9477/7//COMMIT_MSG
Commit Message:

https://gerrit.asterisk.org/#/c/9477/7//COMMIT_MSG@9
PS7, Line 9: The tdata containing response can be shared by both the dialog
           : object and the tsx object.  In order to prevent the a race condition
           : betweet tsx retransmission and dialog sending a response, cancel
           : the retransmission timer before sending a new response.
s/response/the response/
s/the a/a/
s/betweet/between/
s/tsx retransmission and dialog/the tsx retransmission and the dialog/


https://gerrit.asterisk.org/#/c/9477/7/channels/chan_pjsip.c
File channels/chan_pjsip.c:

https://gerrit.asterisk.org/#/c/9477/7/channels/chan_pjsip.c@1192
PS7, Line 1192: 		pjsip_tsx_stop_retransmit(session->inv_session->invite_tsx);
              : 		if (pjsip_inv_answer(session->inv_session, response_code, NULL, NULL, &packet) == PJ_SUCCESS) {
              : 			ast_sip_session_send_response(session, packet);
I think you should call pjsip_tsx_stop_retransmit() right before calling ast_sip_session_send_response() instead.  That way you know you are in a state that can actually send a response.



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

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic381004a3a212fe1d8eca0e707fe09dba4a6ab4e
Gerrit-Change-Number: 9477
Gerrit-PatchSet: 7
Gerrit-Owner: Torrey Searle <tsearle at gmail.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Torrey Searle <tsearle at gmail.com>
Gerrit-Comment-Date: Wed, 25 Jul 2018 14:33:30 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180725/92ec0361/attachment.html>


More information about the asterisk-code-review mailing list