[asterisk-commits] file: branch file/bridging r99381 - /team/file/bridging/main/bridging.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jan 22 10:39:42 CST 2008


Author: file
Date: Mon Jan 21 14:35:33 2008
New Revision: 99381

URL: http://svn.digium.com/view/asterisk?view=rev&rev=99381
Log:
Remove a few pthread_kills that are no longer needed.

Modified:
    team/file/bridging/main/bridging.c

Change Statistics:
 team/file/bridging/main/bridging.c |   10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

Modified: team/file/bridging/main/bridging.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/main/bridging.c?view=diff&rev=99381&r1=99380&r2=99381
==============================================================================
--- team/file/bridging/main/bridging.c (original)
+++ team/file/bridging/main/bridging.c Mon Jan 21 14:35:33 2008
@@ -347,12 +347,10 @@
 	if (bridge->thread != AST_PTHREADT_NULL) {
 		pthread_t thread = bridge->thread;
 
+		/* Request that the bridge thread rebuild it's array, this will cause it to see no channels exist and the thread will exit */
+		ast_bridge_rebuild(bridge);
 		/* Change thread pointer to indicate it should stop */
 		bridge->thread = AST_PTHREADT_STOP;
-		/* Request that the bridge thread rebuild it's array, this will cause it to see no channels exist and the thread will exit */
-		ast_bridge_rebuild(bridge);
-		/* Poke the bridge thread out of it's poll if in it */
-		pthread_kill(thread, SIGURG);
 		/* Give up our lock so that the bridge thread can acquire it */
 		ast_debug(1, "Giving up bridge lock on %p and waiting for thread to exit\n", bridge);
 		ast_mutex_unlock(&bridge->lock);
@@ -796,8 +794,6 @@
 			AST_LIST_REMOVE(&bridge->channels, swap_channel, list);
 			/* Signal the bridge thread to rebuild and poke it if required */
 			ast_bridge_rebuild(bridge);
-			if (bridge->thread != AST_PTHREADT_NULL)
-				pthread_kill(bridge->thread, SIGURG);
 			ast_debug(1, "Releasing bridge lock on %p to ensure swap operation from bridge thread\n", bridge);
 			ast_mutex_unlock(&bridge->lock);
 			usleep(1);
@@ -919,8 +915,6 @@
                         AST_LIST_REMOVE(&bridge->channels, swap_channel, list);
                         /* Signal the bridge thread to rebuild and poke it if required */
 			ast_bridge_rebuild(bridge);
-                        if (bridge->thread != AST_PTHREADT_NULL)
-                                pthread_kill(bridge->thread, SIGURG);
                         ast_debug(1, "Releasing bridge lock on %p to ensure swap operation from bridge thread\n", bridge);
                         ast_mutex_unlock(&bridge->lock);
                         usleep(1);




More information about the asterisk-commits mailing list