From eef959f5d8b00f4dfe9178233b119ead7719be4a Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Mon, 23 Feb 2015 17:07:34 +1100 Subject: [PATCH] Fix use of ckwq variables --- src/ckpool.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/ckpool.c b/src/ckpool.c index cf445281..ff303c50 100644 --- a/src/ckpool.c +++ b/src/ckpool.c @@ -137,27 +137,27 @@ static void *ckmsg_queue(void *arg) /* Generic workqueue function and message receiving and parsing thread */ static void *ckwq_queue(void *arg) { - ckwq_t *ckmsgq = (ckwq_t *)arg; - ckpool_t *ckp = ckmsgq->ckp; + ckwq_t *ckwq = (ckwq_t *)arg; + ckpool_t *ckp = ckwq->ckp; pthread_detach(pthread_self()); - rename_proc(ckmsgq->name); + rename_proc(ckwq->name); while (42) { ckwqmsg_t *wqmsg; tv_t now; ts_t abs; - mutex_lock(ckmsgq->lock); + mutex_lock(ckwq->lock); tv_time(&now); tv_to_ts(&abs, &now); abs.tv_sec++; - if (!ckmsgq->wqmsgs) - cond_timedwait(ckmsgq->cond, ckmsgq->lock, &abs); - wqmsg = ckmsgq->wqmsgs; + if (!ckwq->wqmsgs) + cond_timedwait(ckwq->cond, ckwq->lock, &abs); + wqmsg = ckwq->wqmsgs; if (wqmsg) - DL_DELETE(ckmsgq->wqmsgs, wqmsg); - mutex_unlock(ckmsgq->lock); + DL_DELETE(ckwq->wqmsgs, wqmsg); + mutex_unlock(ckwq->lock); if (!wqmsg) continue; @@ -209,7 +209,7 @@ ckmsgq_t *create_ckmsgqs(ckpool_t *ckp, const char *name, const void *func, cons ckwq_t *create_ckwqs(ckpool_t *ckp, const char *name, const int count) { - ckwq_t *ckwq = ckzalloc(sizeof(ckmsgq_t) * count); + ckwq_t *ckwq = ckzalloc(sizeof(ckwq_t) * count); mutex_t *lock; pthread_cond_t *cond; int i;