aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_skinny.c
diff options
context:
space:
mode:
authorcitats <citats@f38db490-d61c-443f-a65b-d21fe96a405b>2004-03-15 07:51:22 +0000
committercitats <citats@f38db490-d61c-443f-a65b-d21fe96a405b>2004-03-15 07:51:22 +0000
commit1c4a4007af71e31785d40ca0d6a371043dc8e908 (patch)
tree9da7eefab98149c7669e84b70601e9e9d3b91ae5 /channels/chan_skinny.c
parent318e676ec538397aa307deccf765e4131d113fe1 (diff)
Fix bug 1217. Change pthread_t initializers to AST_PTHREADT_NULL and
AST_PTHREADT_STOP git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2434 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_skinny.c')
-rwxr-xr-xchannels/chan_skinny.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c
index b44c49423..0a01bdc57 100755
--- a/channels/chan_skinny.c
+++ b/channels/chan_skinny.c
@@ -599,7 +599,7 @@ static ast_mutex_t devicelock = 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;
/* Wait up to 16 seconds for first digit */
static int firstdigittimeout = 16000;
@@ -2415,7 +2415,7 @@ static int restart_monitor(void)
{
/* If we're supposed to be stopped -- stay stopped */
- if (monitor_thread == (pthread_t)-2)
+ if (monitor_thread == AST_PTHREADT_STOP)
return 0;
if (ast_mutex_lock(&monlock)) {
ast_log(LOG_WARNING, "Unable to lock monitor\n");
@@ -2718,12 +2718,12 @@ int unload_module()
return -1;
}
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 = -2;
+ monitor_thread = AST_PTHREADT_STOP;
ast_mutex_unlock(&monlock);
} else {
ast_log(LOG_WARNING, "Unable to lock the monitor\n");