diff --git a/channels/chan_h323.c b/channels/chan_h323.c index 70761d8836..afecf0f3db 100755 --- a/channels/chan_h323.c +++ b/channels/chan_h323.c @@ -1271,7 +1271,7 @@ static int restart_monitor(void) ast_log(LOG_WARNING, "Cannot kill myself\n"); return -1; } - if (monitor_thread && (monitor_thread != AST_PTHREADT_STOP)) { + if (monitor_thread && (monitor_thread != AST_PTHREADT_NULL)) { /* Wake up the thread */ pthread_kill(monitor_thread, SIGURG); } else { diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c index 1554b33655..f1fa9dec8a 100755 --- a/channels/chan_mgcp.c +++ b/channels/chan_mgcp.c @@ -2569,7 +2569,7 @@ static int restart_monitor(void) ast_log(LOG_WARNING, "Cannot kill myself\n"); return -1; } - if (monitor_thread) { + if (monitor_thread != AST_PTHREADT_NULL) { /* Wake up the thread */ pthread_kill(monitor_thread, SIGURG); } else { diff --git a/channels/chan_sip.c b/channels/chan_sip.c index bcf9ff9a26..7af447007c 100755 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -5829,7 +5829,7 @@ static int restart_monitor(void) ast_log(LOG_WARNING, "Cannot kill myself\n"); return -1; } - if (monitor_thread) { + if (monitor_thread != AST_PTHREADT_NULL) { /* Wake up the thread */ pthread_kill(monitor_thread, SIGURG); } else { diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c index 0a01bdc577..cccb8429cd 100755 --- a/channels/chan_skinny.c +++ b/channels/chan_skinny.c @@ -2426,7 +2426,7 @@ static int restart_monitor(void) ast_log(LOG_WARNING, "Cannot kill myself\n"); return -1; } - if (monitor_thread) { + if (monitor_thread != AST_PTHREADT_NULL) { /* Wake up the thread */ pthread_kill(monitor_thread, SIGURG); } else { diff --git a/channels/chan_vofr.c b/channels/chan_vofr.c index 3d677bd3d4..444701fd7d 100755 --- a/channels/chan_vofr.c +++ b/channels/chan_vofr.c @@ -1008,7 +1008,7 @@ static int restart_monitor(void) ast_log(LOG_WARNING, "Cannot kill myself\n"); return -1; } - if (monitor_thread) { + if (monitor_thread != AST_PTHREADT_NULL) { /* Wake up the thread */ pthread_kill(monitor_thread, SIGURG); } else { diff --git a/channels/chan_zap.c b/channels/chan_zap.c index 930a870fca..48675db0a0 100755 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -5182,7 +5182,7 @@ static int restart_monitor(void) ast_log(LOG_WARNING, "Cannot kill myself\n"); return -1; } - if (monitor_thread) { + if (monitor_thread != AST_PTHREADT_NULL) { /* Just signal it to be sure it wakes up */ #if 0 pthread_cancel(monitor_thread);