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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed May 11 12:57:13 CDT 2016


Joshua Colp has submitted this change and it was merged.

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(-)

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



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: merged
Gerrit-Change-Id: Id57b8cbed9d61222690fcba1e4f18e259df4c7ec
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>



More information about the asterisk-commits mailing list