summaryrefslogtreecommitdiff
path: root/autoservice.c
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2003-09-08 16:48:07 +0000
committerMark Spencer <markster@digium.com>2003-09-08 16:48:07 +0000
commit479a67e629385a2c43bf9383c0c23f5dae032504 (patch)
tree32674bc8c5dc21153e7c8a4548f6641aef0566bf /autoservice.c
parent1e19f72077a8e2f5befb21bb5c3f2131f8b24107 (diff)
BSD portability enhancements (bug #234)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1486 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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 fc81c483b..7e5699b97 100755
--- a/autoservice.c
+++ b/autoservice.c
@@ -44,7 +44,7 @@ struct asent {
};
static struct asent *aslist = NULL;
-static pthread_t asthread = -1;
+static pthread_t asthread = (pthread_t) -1;
static void *autoservice_run(void *ign)
{
@@ -80,7 +80,7 @@ static void *autoservice_run(void *ign)
ast_frfree(f);
}
}
- asthread = -1;
+ asthread = (pthread_t) -1;
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 == -1) ? 1 : 0 /* aslist ? 0 : 1 */;
+ needstart = (asthread == (pthread_t) -1) ? 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 != -1)
+ if (asthread != (pthread_t) -1)
pthread_kill(asthread, SIGURG);
ast_mutex_unlock(&autolock);
/* Wait for it to un-block */