[asterisk-commits] irroot: branch 10 r342017 - /branches/10/apps/app_queue.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Oct 24 02:31:13 CDT 2011


Author: irroot
Date: Mon Oct 24 02:31:10 2011
New Revision: 342017

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=342017
Log:
queues container needs locking when using the OBJ_NOLOCK flag


Modified:
    branches/10/apps/app_queue.c

Modified: branches/10/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/apps/app_queue.c?view=diff&rev=342017&r1=342016&r2=342017
==============================================================================
--- branches/10/apps/app_queue.c (original)
+++ branches/10/apps/app_queue.c Mon Oct 24 02:31:10 2011
@@ -6993,6 +6993,9 @@
 		return -1;
 	}
 
+	/* We've made it here, so it looks like we're doing operations on all queues. */
+	ao2_lock(queues);
+
 	/* Mark all queues as dead for the moment if we're reloading queues.
 	 * For clarity, we could just be reloading members, in which case we don't want to mess
 	 * with the other queue parameters at all*/
@@ -7016,6 +7019,7 @@
 	if (queue_reload) {
 		ao2_callback(queues, OBJ_NODATA | OBJ_MULTIPLE | OBJ_UNLINK | OBJ_NOLOCK, kill_dead_queues, (char *) queuename);
 	}
+	ao2_unlock(queues);
 	return 0;
 }
 




More information about the asterisk-commits mailing list