<p>Joshua Colp has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/7177">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">pjsip: Add patch to allow all transports to be destroyed.<br><br>If a transport is created with the same transport type, source<br>IP address, and source port as one that already exists the old<br>transport is moved into a linked list called "tp_list".<br><br>If this old transport is later shutdown it will not be destroyed<br>as the process checks whether the transport is valid or not. This<br>check does not look at the "tp_list" when making the determination<br>causing the transport to not be destroyed.<br><br>This change updates the logic to query not just the main storage<br>method for transports but also the "tp_list".<br><br>Upstream issue https://trac.pjsip.org/repos/ticket/2061<br><br>ASTERISK-27411<br><br>Change-Id: Ic5c2bb60226df0ef1c8851359ed8d4cd64469429<br>---<br>A third-party/pjproject/patches/0030-sip_transport-Destroy-transports-not-in-hash.patch<br>1 file changed, 27 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/7177/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/third-party/pjproject/patches/0030-sip_transport-Destroy-transports-not-in-hash.patch b/third-party/pjproject/patches/0030-sip_transport-Destroy-transports-not-in-hash.patch<br>new file mode 100644<br>index 0000000..e42b0f7<br>--- /dev/null<br>+++ b/third-party/pjproject/patches/0030-sip_transport-Destroy-transports-not-in-hash.patch<br>@@ -0,0 +1,27 @@<br>+diff --git a/pjsip/src/pjsip/sip_transport.c b/pjsip/src/pjsip/sip_transport.c<br>+index e4bec24..a39b56e 100644<br>+--- a/pjsip/src/pjsip/sip_transport.c<br>++++ b/pjsip/src/pjsip/sip_transport.c<br>+@@ -957,7 +957,21 @@ static pj_bool_t is_transport_valid(pjsip_tpmgr *tpmgr, pjsip_transport *tp,<br>+                                    const pjsip_transport_key *key,<br>+                              int key_len)<br>+ {<br>+-    return (pj_hash_get(tpmgr->table, key, key_len, NULL) == (void*)tp);<br>++    transport *tp_iter;<br>++<br>++    if (pj_hash_get(tpmgr->table, key, key_len, NULL) == (void*)tp) {<br>++        return PJ_TRUE;<br>++    }<br>++<br>++    tp_iter = tpmgr->tp_list.next;<br>++    while (tp_iter != &tpmgr->tp_list) {<br>++        if (tp_iter->tp == tp) {<br>++            return PJ_TRUE;<br>++        }<br>++        tp_iter = tp_iter->next;<br>++    }<br>++<br>++    return PJ_FALSE;<br>+ }<br>+ <br>+ /*<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/7177">change 7177</a>. To unsubscribe, 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/7177"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: certified/13.18 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ic5c2bb60226df0ef1c8851359ed8d4cd64469429 </div>
<div style="display:none"> Gerrit-Change-Number: 7177 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@digium.com> </div>