[Asterisk-code-review] pjproject: Add timer patch from pjproject r5934 (...asterisk[13])

Sean Bright asteriskteam at digium.com
Tue Mar 26 13:10:41 CDT 2019


Sean Bright has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/11182


Change subject: pjproject: Add timer patch from pjproject r5934
......................................................................

pjproject: Add timer patch from pjproject r5934

ASTERISK-28161 #close
Reported by: Ross Beer

Change-Id: I65331d554695753005eaa66c1d5d4807fe9009c8
---
A third-party/pjproject/patches/0030-Re-2176-Removed-pop_freelist-push_freelist-after-rem.patch
1 file changed, 37 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/82/11182/1

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
new file mode 100644
index 0000000..8a44cae
--- /dev/null
+++ b/third-party/pjproject/patches/0030-Re-2176-Removed-pop_freelist-push_freelist-after-rem.patch
@@ -0,0 +1,37 @@
+From 9f57a5728aaec1949908bf7bbd15768fce74e315 Mon Sep 17 00:00:00 2001
+From: Nanang Izzuddin <nanang at teluu.com>
+Date: Wed, 13 Feb 2019 06:51:09 +0000
+Subject: [PATCH] Re #2176: Removed pop_freelist() + push_freelist() after
+ remove_node() as they are not only unnecessary, they cause problem.
+
+git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5934 74dad513-b988-da41-8d7b-12977e46ad98
+---
+ pjlib/src/pj/timer.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/pjlib/src/pj/timer.c b/pjlib/src/pj/timer.c
+index 90a95e37..a1e1932c 100644
+--- a/pjlib/src/pj/timer.c
++++ b/pjlib/src/pj/timer.c
+@@ -630,7 +630,8 @@ PJ_DEF(unsigned) pj_timer_heap_poll( pj_timer_heap_t *ht,
+     {
+ 	pj_timer_entry *node = remove_node(ht, 0);
+ 	/* Avoid re-use of this timer until the callback is done. */
+-	pj_timer_id_t node_timer_id = pop_freelist(ht);
++	///Not necessary, even causes problem (see also #2176).
++	///pj_timer_id_t node_timer_id = pop_freelist(ht);
+ 	pj_grp_lock_t *grp_lock;
+ 
+ 	++count;
+@@ -650,7 +651,7 @@ PJ_DEF(unsigned) pj_timer_heap_poll( pj_timer_heap_t *ht,
+ 
+ 	lock_timer_heap(ht);
+ 	/* Now, the timer is really free for re-use. */
+-	push_freelist(ht, node_timer_id);
++	///push_freelist(ht, node_timer_id);
+     }
+     if (ht->cur_size && next_delay) {
+ 	*next_delay = ht->heap[0]->_timer_value;
+-- 
+2.17.1
+

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

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: I65331d554695753005eaa66c1d5d4807fe9009c8
Gerrit-Change-Number: 11182
Gerrit-PatchSet: 1
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190326/428117b5/attachment.html>


More information about the asterisk-code-review mailing list