mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-29 18:19:30 +00:00
Make chan_zap initialize the pri threads to AST_PTHREADT_NULL and check when calling unload in case load_module fails complete
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3177 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -8094,7 +8094,8 @@ static int __unload_module(void)
|
||||
#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 @@ int load_module(void)
|
||||
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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user