[Asterisk-cvs] asterisk/channels chan_zap.c,1.259,1.260
citats at lists.digium.com
citats at lists.digium.com
Wed Jun 9 03:43:27 CDT 2004
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/home/citats/cvs/asterisk/channels
Modified Files:
chan_zap.c
Log Message:
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.259
retrieving revision 1.260
diff -u -d -r1.259 -r1.260
--- chan_zap.c 9 Jun 2004 01:45:08 -0000 1.259
+++ chan_zap.c 9 Jun 2004 08:46:32 -0000 1.260
@@ -8094,7 +8094,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);
@@ -8798,6 +8799,7 @@
memset(pris, 0, sizeof(pris));
for (y=0;y<NUM_SPANS;y++) {
pris[y].offset = -1;
+ pris[y].master = AST_PTHREADT_NULL;
for (i=0;i<NUM_DCHANS;i++)
pris[y].fds[i] = -1;
}
More information about the svn-commits
mailing list