fix monitor thread. Bug #726
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1976 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
cfc84c1ffb
commit
93f38889cc
|
@ -7048,7 +7048,7 @@ static int __unload_module(void)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (!ast_mutex_lock(&monlock)) {
|
if (!ast_mutex_lock(&monlock)) {
|
||||||
if (monitor_thread) {
|
if (monitor_thread && (monitor_thread != -2)) {
|
||||||
pthread_cancel(monitor_thread);
|
pthread_cancel(monitor_thread);
|
||||||
pthread_kill(monitor_thread, SIGURG);
|
pthread_kill(monitor_thread, SIGURG);
|
||||||
pthread_join(monitor_thread, NULL);
|
pthread_join(monitor_thread, NULL);
|
||||||
|
|
Reference in New Issue