diff options
author | Joshua Colp <jcolp@digium.com> | 2007-06-12 14:16:37 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2007-06-12 14:16:37 +0000 |
commit | 556ea9f5547404ed78a3b2e7c02e8481a4ccb8c0 (patch) | |
tree | 6866b9f3260de4c55530d07267dff67365d79b1a /main/autoservice.c | |
parent | b3475e429a69767c9797eadc026fa7d585439ac1 (diff) |
Even more minor code cleanup!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@68920 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/autoservice.c')
-rw-r--r-- | main/autoservice.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/main/autoservice.c b/main/autoservice.c index 9ce49ac82..029555abd 100644 --- a/main/autoservice.c +++ b/main/autoservice.c @@ -65,8 +65,7 @@ static void *autoservice_run(void *ign) { for (;;) { - struct ast_channel *mons[MAX_AUTOMONS]; - struct ast_channel *chan; + struct ast_channel *mons[MAX_AUTOMONS], *chan; struct asent *as; int x = 0, ms = 500; @@ -81,15 +80,16 @@ static void *autoservice_run(void *ign) } AST_RWLIST_UNLOCK(&aslist); - chan = ast_waitfor_n(mons, x, &ms); - if (chan) { + if ((chan = ast_waitfor_n(mons, x, &ms))) { /* Read and ignore anything that occurs */ struct ast_frame *f = ast_read(chan); if (f) ast_frfree(f); } } + asthread = AST_PTHREADT_NULL; + return NULL; } @@ -151,5 +151,6 @@ int ast_autoservice_stop(struct ast_channel *chan) /* Wait for it to un-block */ while (ast_test_flag(chan, AST_FLAG_BLOCKING)) usleep(1000); + return res; } |