[asterisk-commits] russell: trunk r68325 - /trunk/channels/chan_zap.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Jun 7 15:38:59 MST 2007


Author: russell
Date: Thu Jun  7 17:38:59 2007
New Revision: 68325

URL: http://svn.digium.com/view/asterisk?view=rev&rev=68325
Log:
Fix a couple of places that got missed in the conversion to using the new API
call for creating detached threads.
(issue #9915, reported by elguro, fixed by me)

Modified:
    trunk/channels/chan_zap.c

Modified: trunk/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_zap.c?view=diff&rev=68325&r1=68324&r2=68325
==============================================================================
--- trunk/channels/chan_zap.c (original)
+++ trunk/channels/chan_zap.c Thu Jun  7 17:38:59 2007
@@ -6938,7 +6938,6 @@
 {
 	int res;
 	pthread_t threadid;
-	pthread_attr_t attr;
 	struct ast_channel *chan;
 
 	/* Handle an event on a given channel for the monitor thread. */
@@ -7017,7 +7016,7 @@
 		case SIG_SF:
 				/* Check for callerid, digits, etc */
 				chan = zt_new(i, AST_STATE_RING, 0, SUB_REAL, 0, 0);
-				if (chan && ast_pthread_create(&threadid, &attr, ss_thread, chan)) {
+				if (chan && ast_pthread_create_detached(&threadid, NULL, ss_thread, chan)) {
 					ast_log(LOG_WARNING, "Unable to start simple switch thread on channel %d\n", i->channel);
 					res = tone_zone_play_tone(i->subs[SUB_REAL].zfd, ZT_TONE_CONGESTION);
 					if (res < 0)
@@ -7113,7 +7112,7 @@
 					    "CID detection on channel %d\n",
 					    i->channel);
 				chan = zt_new(i, AST_STATE_PRERING, 0, SUB_REAL, 0, 0);
-				if (chan && ast_pthread_create(&threadid, &attr, ss_thread, chan)) {
+				if (chan && ast_pthread_create_detached(&threadid, NULL, ss_thread, chan)) {
 					ast_log(LOG_WARNING, "Unable to start simple switch thread on channel %d\n", i->channel);
 				}
 			}



More information about the asterisk-commits mailing list