<p>Torrey Searle has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/9477">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">thirdparty/pjproject: fix dealdock in response retransmissions<br><br>The tdata containging response can be shared by both the dialog<br>object and the tsx object.  Before removing headers from the tdata<br>it's therefore necessary to lock both the dialog and the tsx object<br>to avoid race conditions.<br><br>Change-Id: Ic381004a3a212fe1d8eca0e707fe09dba4a6ab4e<br>---<br>A third-party/pjproject/patches/0110_fix_tdata_rexmit_deadlock.patch<br>1 file changed, 15 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/77/9477/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/third-party/pjproject/patches/0110_fix_tdata_rexmit_deadlock.patch b/third-party/pjproject/patches/0110_fix_tdata_rexmit_deadlock.patch</span><br><span>new file mode 100644</span><br><span>index 0000000..83d0ab7</span><br><span>--- /dev/null</span><br><span>+++ b/third-party/pjproject/patches/0110_fix_tdata_rexmit_deadlock.patch</span><br><span>@@ -0,0 +1,15 @@</span><br><span style="color: hsl(120, 100%, 40%);">+--- a/pjsip/src/pjsip-ua/sip_inv.c</span><br><span>++++ b/pjsip/src/pjsip-ua/sip_inv.c</span><br><span style="color: hsl(120, 100%, 40%);">+@@ -2400,7 +2400,12 @@ PJ_DEF(pj_status_t) pjsip_inv_answer( pj</span><br><span style="color: hsl(120, 100%, 40%);">+ </span><br><span style="color: hsl(120, 100%, 40%);">+     /* Modify last response. */</span><br><span style="color: hsl(120, 100%, 40%);">+     last_res = inv->last_answer;</span><br><span style="color: hsl(120, 100%, 40%);">++    /* Lock the transaction as it also has a reference to the last response and timers</span><br><span style="color: hsl(120, 100%, 40%);">++       may access it */</span><br><span style="color: hsl(120, 100%, 40%);">++    pj_grp_lock_acquire(inv->invite_tsx->grp_lock);</span><br><span style="color: hsl(120, 100%, 40%);">+     status = pjsip_dlg_modify_response(inv->dlg, last_res, st_code, st_text);</span><br><span style="color: hsl(120, 100%, 40%);">++    pj_grp_lock_release(inv->invite_tsx->grp_lock);</span><br><span style="color: hsl(120, 100%, 40%);">++</span><br><span style="color: hsl(120, 100%, 40%);">+     if (status != PJ_SUCCESS)</span><br><span style="color: hsl(120, 100%, 40%);">+        goto on_return;</span><br><span style="color: hsl(120, 100%, 40%);">+ </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/9477">change 9477</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/9477"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ic381004a3a212fe1d8eca0e707fe09dba4a6ab4e </div>
<div style="display:none"> Gerrit-Change-Number: 9477 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Torrey Searle <tsearle@gmail.com> </div>