aboutsummaryrefslogtreecommitdiffstats
path: root/autoservice.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 /autoservice.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 'autoservice.c')
-rwxr-xr-xautoservice.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/autoservice.c b/autoservice.c
index 7e5699b97..3f24db8c1 100755
--- a/autoservice.c
+++ b/autoservice.c
@@ -44,7 +44,7 @@ struct asent {
};
static struct asent *aslist = NULL;
-static pthread_t asthread = (pthread_t) -1;
+static pthread_t asthread = AST_PTHREADT_NULL;
static void *autoservice_run(void *ign)
{
@@ -80,7 +80,7 @@ static void *autoservice_run(void *ign)
ast_frfree(f);
}
}
- asthread = (pthread_t) -1;
+ asthread = AST_PTHREADT_NULL;
return NULL;
}
@@ -90,7 +90,7 @@ int ast_autoservice_start(struct ast_channel *chan)
struct asent *as;
int needstart;
ast_mutex_lock(&autolock);
- needstart = (asthread == (pthread_t) -1) ? 1 : 0 /* aslist ? 0 : 1 */;
+ needstart = (asthread == AST_PTHREADT_NULL) ? 1 : 0 /* aslist ? 0 : 1 */;
as = aslist;
while(as) {
if (as->chan == chan)
@@ -142,7 +142,7 @@ int ast_autoservice_stop(struct ast_channel *chan)
if (!chan->_softhangup)
res = 0;
}
- if (asthread != (pthread_t) -1)
+ if (asthread != AST_PTHREADT_NULL)
pthread_kill(asthread, SIGURG);
ast_mutex_unlock(&autolock);
/* Wait for it to un-block */