summaryrefslogtreecommitdiff
path: root/main/threadpool.c
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2012-12-07 19:05:30 +0000
committerMark Michelson <mmichelson@digium.com>2012-12-07 19:05:30 +0000
commit3a25935f7d0109aa63da14589790bd695fd1164c (patch)
tree536b4c0d0f728944fcf37d9ec48ec2f420c6ecb6 /main/threadpool.c
parentec29862a92eec18050ade673e924ecb72f04985f (diff)
Fix infinite looping and crash problem.
MALLOC_DEBUG is complaining about corrupted memory on taskprocessor listeners, but I'm not seeing it, nor is valgrind. Not sure what's up there. git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377377 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/threadpool.c')
-rw-r--r--main/threadpool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/threadpool.c b/main/threadpool.c
index 1b0477926..5ed9a42d1 100644
--- a/main/threadpool.c
+++ b/main/threadpool.c
@@ -784,7 +784,7 @@ static void worker_active(struct worker_thread *worker)
{
int alive = 1;
while (alive) {
- if (threadpool_execute(worker->pool)) {
+ if (threadpool_execute(worker->pool) == 0) {
alive = worker_idle(worker);
}
}