[asterisk-commits] file: branch file/chanlist r51223 - /team/file/chanlist/main/channel.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Jan 18 09:19:58 MST 2007


Author: file
Date: Thu Jan 18 10:19:57 2007
New Revision: 51223

URL: http://svn.digium.com/view/asterisk?view=rev&rev=51223
Log:
Unlock/relock channel list while attempting to get the channel lock to give other threads a go at things.

Modified:
    team/file/chanlist/main/channel.c

Modified: team/file/chanlist/main/channel.c
URL: http://svn.digium.com/view/asterisk/team/file/chanlist/main/channel.c?view=diff&rev=51223&r1=51222&r2=51223
==============================================================================
--- team/file/chanlist/main/channel.c (original)
+++ team/file/chanlist/main/channel.c Thu Jan 18 10:19:57 2007
@@ -917,7 +917,9 @@
 		for (retries = 0; retries < 10; retries++) {
 			if (!ast_channel_trylock(c))
 				break;
+			AST_RWLIST_UNLOCK(&channels);
 			usleep(1);
+			AST_RWLIST_RDLOCK(&channels);
 		}
 
 		/* If we failed to get the lock either return now because we matched data, or skip over the channel */



More information about the asterisk-commits mailing list