[svn-commits] pabelanger: branch 1.6.2 r266878 - in /branches/1.6.2: ./ main/bridging.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Jun 2 08:34:14 CDT 2010


Author: pabelanger
Date: Wed Jun  2 08:34:09 2010
New Revision: 266878

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=266878
Log:
Merged revisions 266877 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r266877 | pabelanger | 2010-06-02 09:32:22 -0400 (Wed, 02 Jun 2010) | 10 lines
  
  pthread_join to assure the thread is really gone
  
  (closes issue #15465)
  Reported by: fnordian
  Patches:
        bridging.patch uploaded by fnordian (license 110)
  Tested by: lmadsen, fnordian, peterh
  
  Review: https://reviewboard.asterisk.org/r/679/
........

Modified:
    branches/1.6.2/   (props changed)
    branches/1.6.2/main/bridging.c

Propchange: branches/1.6.2/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.2/main/bridging.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/main/bridging.c?view=diff&rev=266878&r1=266877&r2=266878
==============================================================================
--- branches/1.6.2/main/bridging.c (original)
+++ branches/1.6.2/main/bridging.c Wed Jun  2 08:34:09 2010
@@ -626,11 +626,16 @@
 		if (new_technology->capabilities & AST_BRIDGE_CAPABILITY_THREAD) {
 			ast_debug(1, "Telling current bridge thread for bridge %p to refresh\n", bridge);
 			bridge->refresh = 1;
+			bridge_poke(bridge);
 		} else {
+			pthread_t bridge_thread = bridge->thread;
 			ast_debug(1, "Telling current bridge thread for bridge %p to stop\n", bridge);
 			bridge->stop = 1;
-		}
-		bridge_poke(bridge);
+			bridge_poke(bridge);
+			ao2_unlock(bridge);
+			pthread_join(bridge_thread, NULL);
+			ao2_lock(bridge);
+		}
 	}
 
 	/* Since we are soon going to pass this bridge to a new technology we need to NULL out the bridge_pvt pointer but don't worry as it still exists in temp_bridge, ditto for the old technology */




More information about the svn-commits mailing list