[Asterisk-cvs] asterisk/channels chan_zap.c,1.171.2.22,1.171.2.23

citats at lists.digium.com citats at lists.digium.com
Wed Jun 9 03:43:40 CDT 2004


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/home/citats/cvs/asterisk-stable/channels

Modified Files:
      Tag: v1-0_stable
	chan_zap.c 
Log Message:
Backport to stable Make chan_zap initialize the pri threads to AST_PTHREADT_NULL and check when calling unload in case load_module fails complete

Index: chan_zap.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v
retrieving revision 1.171.2.22
retrieving revision 1.171.2.23
diff -u -d -r1.171.2.22 -r1.171.2.23
--- chan_zap.c	28 Apr 2004 14:32:54 -0000	1.171.2.22
+++ chan_zap.c	9 Jun 2004 08:46:45 -0000	1.171.2.23
@@ -7220,7 +7220,8 @@
 #ifdef ZAPATA_PRI
 	int i;
 	for(i=0;i<NUM_SPANS;i++) {
-		pthread_cancel(pris[i].master);
+		if (pris[i].master != AST_PTHREADT_NULL) 
+			pthread_cancel(pris[i].master);
 	}
 	ast_cli_unregister(&pri_debug);
 	ast_cli_unregister(&pri_no_debug);
@@ -7694,6 +7695,7 @@
 	for (y=0;y<NUM_SPANS;y++) {
 		pris[y].offset = -1;
 		pris[y].fd = -1;
+		pris[y].master = AST_PTHREADT_NULL;
 	}
 	pri_set_error(zt_pri_error);
 	pri_set_message(zt_pri_message);




More information about the svn-commits mailing list