[asterisk-commits] tilghman: trunk r154264 - in /trunk: ./ channels/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Nov 4 12:59:49 CST 2008


Author: tilghman
Date: Tue Nov  4 12:59:48 2008
New Revision: 154264

URL: http://svn.digium.com/view/asterisk?view=rev&rev=154264
Log:
Recorded merge of revisions 154263 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r154263 | tilghman | 2008-11-04 12:58:05 -0600 (Tue, 04 Nov 2008) | 3 lines
  
  Make the monitor thread non-detached, so it can be joined (suggested by Russell
  on -dev list).
........

Modified:
    trunk/   (props changed)
    trunk/channels/chan_h323.c
    trunk/channels/chan_skinny.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/channels/chan_h323.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_h323.c?view=diff&rev=154264&r1=154263&r2=154264
==============================================================================
--- trunk/channels/chan_h323.c (original)
+++ trunk/channels/chan_h323.c Tue Nov  4 12:59:48 2008
@@ -2604,7 +2604,7 @@
 		pthread_kill(monitor_thread, SIGURG);
 	} else {
 		/* Start a new monitor */
-		if (ast_pthread_create_detached_background(&monitor_thread, NULL, do_monitor, NULL) < 0) {
+		if (ast_pthread_create_background(&monitor_thread, NULL, do_monitor, NULL) < 0) {
 			monitor_thread = AST_PTHREADT_NULL;
 			ast_mutex_unlock(&monlock);
 			ast_log(LOG_ERROR, "Unable to start monitor thread.\n");
@@ -3320,8 +3320,7 @@
 				pthread_cancel(monitor_thread);
 			}
 			pthread_kill(monitor_thread, SIGURG);
-			/* Cannot join detached threads */
-			/* pthread_join(monitor_thread, NULL); */
+			pthread_join(monitor_thread, NULL);
 		}
 		monitor_thread = AST_PTHREADT_STOP;
 		ast_mutex_unlock(&monlock);

Modified: trunk/channels/chan_skinny.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_skinny.c?view=diff&rev=154264&r1=154263&r2=154264
==============================================================================
--- trunk/channels/chan_skinny.c (original)
+++ trunk/channels/chan_skinny.c Tue Nov  4 12:59:48 2008
@@ -5917,7 +5917,7 @@
 		AST_LIST_INSERT_HEAD(&sessions, s, list);
 		AST_LIST_UNLOCK(&sessions);
 
-		if (ast_pthread_create_detached(&s->t, NULL, skinny_session, s)) {
+		if (ast_pthread_create(&s->t, NULL, skinny_session, s)) {
 			destroy_session(s);
 		}
 	}




More information about the asterisk-commits mailing list