From: James Golovich Date: Mon, 15 Mar 2004 09:14:16 +0000 (+0000) Subject: Fixup some pthread_t checking in channels X-Git-Tag: 1.0.0-rc1~932 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9223055df15f5366060e793d66da8ca3de8c0ba5;p=thirdparty%2Fasterisk.git Fixup some pthread_t checking in channels git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2438 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- 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);