[asterisk-commits] anthonyl: branch anthonyl/7864-patch r43619 - /team/anthonyl/7864-patch/apps/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Sep 25 08:55:03 MST 2006


Author: anthonyl
Date: Mon Sep 25 10:55:02 2006
New Revision: 43619

URL: http://svn.digium.com/view/asterisk?rev=43619&view=rev
Log:
patch in

Modified:
    team/anthonyl/7864-patch/apps/app_queue.c

Modified: team/anthonyl/7864-patch/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/anthonyl/7864-patch/apps/app_queue.c?rev=43619&r1=43618&r2=43619&view=diff
==============================================================================
--- team/anthonyl/7864-patch/apps/app_queue.c (original)
+++ team/anthonyl/7864-patch/apps/app_queue.c Mon Sep 25 10:55:02 2006
@@ -432,11 +432,12 @@
 	QUEUE_NORMAL
 };
 
-static enum queue_member_status get_member_status(const struct call_queue *q)
+static enum queue_member_status get_member_status(struct call_queue *q)
 {
 	struct member *member;
 	enum queue_member_status result = QUEUE_NO_MEMBERS;
 
+	ast_mutex_lock(&q->lock);
 	for (member = q->members; member; member = member->next) {
 		if (member->paused) continue;
 
@@ -448,10 +449,12 @@
 			result = QUEUE_NO_REACHABLE_MEMBERS;
 			break;
 		default:
+			ast_mutex_unlock(&q->lock);
 			return QUEUE_NORMAL;
 		}
 	}
 	
+	ast_mutex_unlock(&q->lock);
 	return result;
 }
 



More information about the asterisk-commits mailing list