[Asterisk-code-review] res pjsip outbound publish: Won't unload if condition wait t... (asterisk[master])

Kevin Harwell asteriskteam at digium.com
Tue May 3 16:11:22 CDT 2016


Kevin Harwell has uploaded a new change for review.

  https://gerrit.asterisk.org/2752

Change subject: res_pjsip_outbound_publish: Won't unload if condition wait times out
......................................................................

res_pjsip_outbound_publish: Won't unload if condition wait times out

When res_pjsip_outbound_publish unloads it has to wait for all current
publishing objects to get done. However if the wait condition times out
then it does not fail the unload. This sometimes results in an infinite
loop check while unloading. This patch now fails the unload operation if
the condition times out.

Change-Id: Id57b8cbed9d61222690fcba1e4f18e259df4c7ec
---
M res/res_pjsip_outbound_publish.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/52/2752/1

diff --git a/res/res_pjsip_outbound_publish.c b/res/res_pjsip_outbound_publish.c
index f13af10..0f0e290 100644
--- a/res/res_pjsip_outbound_publish.c
+++ b/res/res_pjsip_outbound_publish.c
@@ -1221,7 +1221,7 @@
 
 	/* wait for items to unpublish */
 	ast_verb(5, "Waiting to complete unpublishing task(s)\n");
-	while (unloading.count) {
+	while (unloading.count && !res) {
 		res = ast_cond_timedwait(&unloading.cond, &unloading.lock, &end);
 	}
 	ast_mutex_unlock(&unloading.lock);

-- 
To view, visit https://gerrit.asterisk.org/2752
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id57b8cbed9d61222690fcba1e4f18e259df4c7ec
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>



More information about the asterisk-code-review mailing list