diff options
author | (no author) <(no author)@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-04-13 04:46:23 +0000 |
---|---|---|
committer | (no author) <(no author)@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-04-13 04:46:23 +0000 |
commit | d46468f42c6762ce7646e773c7d0919ed1f626d4 (patch) | |
tree | 5d62a34385385b3485137835b2629174ca0464cf /channels/chan_h323.c | |
parent | f38bc8131c9eda8d0b0eabaafbaa53f4247989c4 (diff) |
This commit was manufactured by cvs2svn to create tag 'v0_9_0'.
git-svn-id: http://svn.digium.com/svn/asterisk/tags/v0_9_0@2684 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_h323.c')
-rwxr-xr-x | channels/chan_h323.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/channels/chan_h323.c b/channels/chan_h323.c index 4077ea614..45f0a0c4d 100755 --- a/channels/chan_h323.c +++ b/channels/chan_h323.c @@ -148,7 +148,7 @@ static ast_mutex_t monlock = AST_MUTEX_INITIALIZER; /* This is the thread for the monitor which checks for input on the channels which are not currently in use. */ -static pthread_t monitor_thread = 0; +static pthread_t monitor_thread = AST_PTHREADT_NULL; static int restart_monitor(void); @@ -1259,7 +1259,7 @@ restartsearch: static int restart_monitor(void) { /* If we're supposed to be stopped -- stay stopped */ - if (monitor_thread == -2) + if (monitor_thread == AST_PTHREADT_STOP) return 0; if (ast_mutex_lock(&monlock)) { ast_log(LOG_WARNING, "Unable to lock monitor\n"); @@ -1270,7 +1270,7 @@ static int restart_monitor(void) ast_log(LOG_WARNING, "Cannot kill myself\n"); return -1; } - if (monitor_thread && (monitor_thread != -2)) { + if (monitor_thread && (monitor_thread != AST_PTHREADT_NULL)) { /* Wake up the thread */ pthread_kill(monitor_thread, SIGURG); } else { @@ -1839,12 +1839,12 @@ int unload_module() } if (!ast_mutex_lock(&monlock)) { - if (monitor_thread && (monitor_thread != -2)) { + if (monitor_thread && (monitor_thread != AST_PTHREADT_STOP)) { pthread_cancel(monitor_thread); pthread_kill(monitor_thread, SIGURG); pthread_join(monitor_thread, NULL); } - monitor_thread = (pthread_t) -2; + monitor_thread = AST_PTHREADT_STOP; ast_mutex_unlock(&monlock); } else { ast_log(LOG_WARNING, "Unable to lock the monitor\n"); |