[asterisk-commits] bbryant: trunk r69807 - /trunk/apps/app_queue.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Jun 18 17:23:52 CDT 2007
Author: bbryant
Date: Mon Jun 18 17:23:51 2007
New Revision: 69807
URL: http://svn.digium.com/view/asterisk?view=rev&rev=69807
Log:
Fixed issue where 'stop gracfeully' was hanging ...
Modified:
trunk/apps/app_queue.c
Modified: trunk/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_queue.c?view=diff&rev=69807&r1=69806&r2=69807
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Mon Jun 18 17:23:51 2007
@@ -628,13 +628,16 @@
while (!device_state.stop) {
ast_mutex_lock(&device_state.lock);
- while (!(sc = AST_LIST_REMOVE_HEAD(&device_state.state_change_q, entry)))
- ast_cond_wait(&device_state.cond, &device_state.lock);
+ ast_cond_wait(&device_state.cond, &device_state.lock);
+ sc = AST_LIST_REMOVE_HEAD(&device_state.state_change_q, entry);
ast_mutex_unlock(&device_state.lock);
/* Check to see if we were woken up to see the request to stop */
if (device_state.stop)
return NULL;
+
+ if (!sc)
+ continue;
handle_statechange(sc);
More information about the asterisk-commits
mailing list