mirror of
https://github.com/asterisk/asterisk.git
synced 2026-05-05 04:43:44 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user