From: Howard Chu Date: Thu, 11 Jun 2009 05:02:58 +0000 (+0000) Subject: Fix prev commit, note *task* not *thread* ... X-Git-Tag: ACLCHECK_0~502 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=39c9b1ab255a5aabc5be1960fd970ed0e860dcd6;p=openldap Fix prev commit, note *task* not *thread* ... --- diff --git a/libraries/libldap_r/tpool.c b/libraries/libldap_r/tpool.c index 7e841898f5..17061a3744 100644 --- a/libraries/libldap_r/tpool.c +++ b/libraries/libldap_r/tpool.c @@ -373,8 +373,8 @@ ldap_pvt_thread_pool_submit ( return(-1); } -/* Cancel a pending thread that was previously submitted. - * Return 1 if the thread was successfully cancelled, 0 if +/* Cancel a pending task that was previously submitted. + * Return 1 if the task was successfully cancelled, 0 if * not found, -1 for invalid parameters */ int @@ -402,9 +402,10 @@ ldap_pvt_thread_pool_retract ( ldap_int_thread_task_s, ltt_next.q); LDAP_SLIST_INSERT_HEAD(&pool->ltp_free_list, task, ltt_next.l); - return 1; + break; } - return 0; + ldap_pvt_thread_mutex_unlock(&pool->ltp_mutex); + return task != NULL; } /* Set max #threads. value <= 0 means max supported #threads (LDAP_MAXTHR) */