<p>Sean Bright has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/11182">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">pjproject: Add timer patch from pjproject r5934<br><br>ASTERISK-28161 #close<br>Reported by: Ross Beer<br><br>Change-Id: I65331d554695753005eaa66c1d5d4807fe9009c8<br>---<br>A third-party/pjproject/patches/0030-Re-2176-Removed-pop_freelist-push_freelist-after-rem.patch<br>1 file changed, 37 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/82/11182/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/third-party/pjproject/patches/0030-Re-2176-Removed-pop_freelist-push_freelist-after-rem.patch b/third-party/pjproject/patches/0030-Re-2176-Removed-pop_freelist-push_freelist-after-rem.patch</span><br><span>new file mode 100644</span><br><span>index 0000000..8a44cae</span><br><span>--- /dev/null</span><br><span>+++ b/third-party/pjproject/patches/0030-Re-2176-Removed-pop_freelist-push_freelist-after-rem.patch</span><br><span>@@ -0,0 +1,37 @@</span><br><span style="color: hsl(120, 100%, 40%);">+From 9f57a5728aaec1949908bf7bbd15768fce74e315 Mon Sep 17 00:00:00 2001</span><br><span style="color: hsl(120, 100%, 40%);">+From: Nanang Izzuddin <nanang@teluu.com></span><br><span style="color: hsl(120, 100%, 40%);">+Date: Wed, 13 Feb 2019 06:51:09 +0000</span><br><span style="color: hsl(120, 100%, 40%);">+Subject: [PATCH] Re #2176: Removed pop_freelist() + push_freelist() after</span><br><span style="color: hsl(120, 100%, 40%);">+ remove_node() as they are not only unnecessary, they cause problem.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5934 74dad513-b988-da41-8d7b-12977e46ad98</span><br><span style="color: hsl(120, 100%, 40%);">+---</span><br><span style="color: hsl(120, 100%, 40%);">+ pjlib/src/pj/timer.c | 5 +++--</span><br><span style="color: hsl(120, 100%, 40%);">+ 1 file changed, 3 insertions(+), 2 deletions(-)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+diff --git a/pjlib/src/pj/timer.c b/pjlib/src/pj/timer.c</span><br><span style="color: hsl(120, 100%, 40%);">+index 90a95e37..a1e1932c 100644</span><br><span style="color: hsl(120, 100%, 40%);">+--- a/pjlib/src/pj/timer.c</span><br><span>++++ b/pjlib/src/pj/timer.c</span><br><span style="color: hsl(120, 100%, 40%);">+@@ -630,7 +630,8 @@ PJ_DEF(unsigned) pj_timer_heap_poll( pj_timer_heap_t *ht,</span><br><span style="color: hsl(120, 100%, 40%);">+     {</span><br><span style="color: hsl(120, 100%, 40%);">+    pj_timer_entry *node = remove_node(ht, 0);</span><br><span style="color: hsl(120, 100%, 40%);">+    /* Avoid re-use of this timer until the callback is done. */</span><br><span style="color: hsl(120, 100%, 40%);">+- pj_timer_id_t node_timer_id = pop_freelist(ht);</span><br><span style="color: hsl(120, 100%, 40%);">++      ///Not necessary, even causes problem (see also #2176).</span><br><span style="color: hsl(120, 100%, 40%);">++      ///pj_timer_id_t node_timer_id = pop_freelist(ht);</span><br><span style="color: hsl(120, 100%, 40%);">+    pj_grp_lock_t *grp_lock;</span><br><span style="color: hsl(120, 100%, 40%);">+ </span><br><span style="color: hsl(120, 100%, 40%);">+   ++count;</span><br><span style="color: hsl(120, 100%, 40%);">+@@ -650,7 +651,7 @@ PJ_DEF(unsigned) pj_timer_heap_poll( pj_timer_heap_t *ht,</span><br><span style="color: hsl(120, 100%, 40%);">+ </span><br><span style="color: hsl(120, 100%, 40%);">+    lock_timer_heap(ht);</span><br><span style="color: hsl(120, 100%, 40%);">+  /* Now, the timer is really free for re-use. */</span><br><span style="color: hsl(120, 100%, 40%);">+-      push_freelist(ht, node_timer_id);</span><br><span style="color: hsl(120, 100%, 40%);">++    ///push_freelist(ht, node_timer_id);</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+     if (ht->cur_size && next_delay) {</span><br><span style="color: hsl(120, 100%, 40%);">+       *next_delay = ht->heap[0]->_timer_value;</span><br><span style="color: hsl(120, 100%, 40%);">+-- </span><br><span style="color: hsl(120, 100%, 40%);">+2.17.1</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/c/asterisk/+/11182">change 11182</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/c/asterisk/+/11182"/><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-Change-Id: I65331d554695753005eaa66c1d5d4807fe9009c8 </div>
<div style="display:none"> Gerrit-Change-Number: 11182 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>