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

George Joseph asteriskteam at digium.com
Tue Apr 2 10:28:15 CDT 2019


George Joseph has submitted this change and it was merged. ( 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(-)

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved; Approved for Submit



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-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190402/96b8f6f5/attachment.html>


More information about the asterisk-code-review mailing list