[asterisk-commits] mmichelson: branch group/CCSS r234378 - /team/group/CCSS/channels/chan_dahdi.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Dec 11 16:10:42 CST 2009


Author: mmichelson
Date: Fri Dec 11 16:10:39 2009
New Revision: 234378

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=234378
Log:
Fix a locking issue.


Modified:
    team/group/CCSS/channels/chan_dahdi.c

Modified: team/group/CCSS/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/channels/chan_dahdi.c?view=diff&rev=234378&r1=234377&r2=234378
==============================================================================
--- team/group/CCSS/channels/chan_dahdi.c (original)
+++ team/group/CCSS/channels/chan_dahdi.c Fri Dec 11 16:10:39 2009
@@ -12051,9 +12051,6 @@
 		}
 		*groupmatch = ((ast_group_t) 1 << x);
 
-		/* Lock the interface list */
-		ast_mutex_lock(&iflock);
-
 		if (toupper(args.group[0]) == 'G') {
 			if (args.group[0] == 'G') {
 				*backwards = 1;
@@ -12086,9 +12083,6 @@
 			*channelmatch = x;
 		}
 
-		/* Lock the interface list */
-		ast_mutex_lock(&iflock);
-
 		p = iflist;
 	}
 	return p;
@@ -12134,6 +12128,7 @@
 	p = determine_starting_point(data, &groupmatch, &channelmatch, &backwards, &roundrobin);
 	/* Search for an unowned channel */
 	exitpvt = p;
+	ast_mutex_lock(&iflock);
 	while (p && !tmp) {
 		if (roundrobin)
 			round_robin[x] = p;




More information about the asterisk-commits mailing list