[svn-commits] dvossel: branch 1.6.0 r246122 - in /branches/1.6.0: ./ apps/app_queue.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Feb 10 11:56:16 CST 2010


Author: dvossel
Date: Wed Feb 10 11:56:12 2010
New Revision: 246122

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=246122
Log:
Merged revisions 246116 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r246116 | dvossel | 2010-02-10 11:49:34 -0600 (Wed, 10 Feb 2010) | 14 lines
  
  Merged revisions 246115 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r246115 | dvossel | 2010-02-10 11:44:20 -0600 (Wed, 10 Feb 2010) | 8 lines
    
    fixes random deadlock in app_queue with use_weight during reload
    
    (closes issue #16677)
    Reported by: tim_ringenbach
    Patches:
          app_queue_use_weight_deadlock.diff uploaded by tim ringenbach (license 540)
  ........
................

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/apps/app_queue.c

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.0/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.0/apps/app_queue.c?view=diff&rev=246122&r1=246121&r2=246122
==============================================================================
--- branches/1.6.0/apps/app_queue.c (original)
+++ branches/1.6.0/apps/app_queue.c Wed Feb 10 11:56:12 2010
@@ -3351,6 +3351,7 @@
 	struct ao2_iterator memi;
 	struct ast_datastore *datastore, *transfer_ds;
 	struct queue_end_bridge *queue_end_bridge = NULL;
+	const int need_weight = use_weight;
 
 	ast_channel_lock(qe->chan);
 	datastore = ast_channel_datastore_find(qe->chan, &dialed_interface_info, NULL);
@@ -3422,7 +3423,7 @@
 		}
 
 	/* Hold the lock while we setup the outgoing calls */
-	if (use_weight)
+	if (need_weight)
 		ao2_lock(queues);
 	ao2_lock(qe->parent);
 	ast_debug(1, "%s is trying to call a queue member.\n",
@@ -3442,7 +3443,7 @@
 			ao2_ref(cur, -1);
 			ao2_unlock(qe->parent);
 			ao2_iterator_destroy(&memi);
-			if (use_weight)
+			if (need_weight)
 				ao2_unlock(queues);
 			goto out;
 		}
@@ -3451,7 +3452,7 @@
 				ao2_ref(cur, -1);
 				ao2_unlock(qe->parent);
 				ao2_iterator_destroy(&memi);
-				if (use_weight)
+				if (need_weight)
 					ao2_unlock(queues);
 				free(tmp);
 				goto out;
@@ -3461,7 +3462,7 @@
 				ao2_ref(cur, -1);
 				ao2_unlock(&qe->parent);
 				ao2_iterator_destroy(&memi);
-				if (use_weight)
+				if (need_weight)
 					ao2_unlock(queues);
 				free(tmp);
 				goto out;
@@ -3499,7 +3500,7 @@
 				ao2_ref(cur, -1);
 				ao2_unlock(qe->parent);
 				ao2_iterator_destroy(&memi);
-				if (use_weight)
+				if (need_weight)
 					ao2_unlock(queues);
 				free(tmp);
 				goto out;
@@ -3541,7 +3542,7 @@
 	++qe->pending;
 	ao2_unlock(qe->parent);
 	ring_one(qe, outgoing, &numbusies);
-	if (use_weight)
+	if (need_weight)
 		ao2_unlock(queues);
 	lpeer = wait_for_answer(qe, outgoing, &to, &digit, numbusies, ast_test_flag(&(bridge_config.features_caller), AST_FEATURE_DISCONNECT), forwardsallowed);
 	/* The ast_channel_datastore_remove() function could fail here if the




More information about the svn-commits mailing list