Few minor thread synchronization tweaks. (issue #10124 reported by gzero)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@74045 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Joshua Colp
2007-07-09 14:49:05 +00:00
parent 475e3be7c0
commit ce4e654f2c
2 changed files with 14 additions and 5 deletions

View File

@@ -4778,7 +4778,7 @@ static int unload_module(void)
delete_devices();
ast_mutex_lock(&monlock);
if (monitor_thread && (monitor_thread != AST_PTHREADT_STOP)) {
if ((monitor_thread != AST_PTHREADT_NULL) && (monitor_thread != AST_PTHREADT_STOP)) {
pthread_cancel(monitor_thread);
pthread_kill(monitor_thread, SIGURG);
pthread_join(monitor_thread, NULL);