https://bugs.openldap.org/show_bug.cgi?id=9045
--- Comment #8 from Ondřej Kuzník ondra@mistotebe.net --- Oh yeah, config_back_entry_get actually wants to distinguish three situations coming from ldap_pvt_thread_pool_pausequery: - not paused - keep going, rlock cfb->cb_rwlock so the entry is safe to read - paused - keep going, we are the thread that wlocked cfb->cb_rwlock - WANT_PAUSE - a pause is starting, but we're *not* paused!
We should either rlock anyway and make it the calling thread's responsibility to check for a pause if they care - should make ldap_pvt_thread_pool_pausequery return (pool->ltp_pause != PAUSED)
Or we return LDAP_BUSY or something of the sort - would need ldap_pvt_thread_pool_pausequery to return pool->ltp_pause and expose the `enum { NOT_PAUSED = 0, WANT_PAUSE = 1, PAUSED = 2 };` in ldap_pvt.h