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

Kevin Harwell asteriskteam at digium.com
Wed May 11 11:40:42 CDT 2016


Kevin Harwell has uploaded a new change for review.

  https://gerrit.asterisk.org/2803

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/03/2803/1

diff --git a/res/res_pjsip_outbound_publish.c b/res/res_pjsip_outbound_publish.c
index 60f9bbb..141cdef 100644
--- a/res/res_pjsip_outbound_publish.c
+++ b/res/res_pjsip_outbound_publish.c
@@ -1200,7 +1200,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/2803
To unsubscribe, visit https://gerrit.asterisk.org/settings

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



More information about the asterisk-code-review mailing list