]> git.sur5r.net Git - openldap/commitdiff
In pool_resume don't touch the condvar if the pool is tearing down.
authorHoward Chu <hyc@openldap.org>
Thu, 18 Oct 2007 06:52:54 +0000 (06:52 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 18 Oct 2007 06:52:54 +0000 (06:52 +0000)
libraries/libldap_r/tpool.c

index 6884f32fc3d4d1cb9900dc1981c60f421a823e9f..06124de96c97e1b948c77b226cfea5b85e05bd4f 100644 (file)
@@ -702,7 +702,8 @@ ldap_pvt_thread_pool_resume (
 
        ldap_pvt_thread_mutex_lock(&pool->ltp_mutex);
        pool->ltp_pause = 0;
-       ldap_pvt_thread_cond_broadcast(&pool->ltp_cond);
+       if (pool->ltp_state == LDAP_INT_THREAD_POOL_RUNNING)
+               ldap_pvt_thread_cond_broadcast(&pool->ltp_cond);
        ldap_pvt_thread_mutex_unlock(&pool->ltp_mutex);
        return(0);
 }