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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Aug 11 10:17:44 CDT 2007


Author: file
Date: Sat Aug 11 10:17:43 2007
New Revision: 79171

URL: http://svn.digium.com/view/asterisk?view=rev&rev=79171
Log:
Can't forget to tell the bridge thread to stop.

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

Modified: team/file/bridging/main/bridging.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/main/bridging.c?view=diff&rev=79171&r1=79170&r2=79171
==============================================================================
--- team/file/bridging/main/bridging.c (original)
+++ team/file/bridging/main/bridging.c Sat Aug 11 10:17:43 2007
@@ -301,10 +301,12 @@
 	if (bridge->thread != AST_PTHREADT_NULL) {
 		pthread_t thread = bridge->thread;
 
+		/* 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_set_flag(&bridge->notify_flags, AST_BRIDGE_NOTIFY_REBUILD);
 		/* Poke the bridge thread out of it's poll if in it */
-		pthread_kill(bridge->thread, SIGURG);
+		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);




More information about the asterisk-commits mailing list