dev  

Re: Disconnecting -lldap from utilizing apr-util

Ruediger Pluem
Fri, 23 May 2008 14:35:58 -0700



On 05/23/2008 10:05 PM, William A. Rowe, Jr. wrote:
Joe Orton wrote:

More review:

1) the DSO-loading stuff is not thread-safe (dsos global not mutex-protected) yet apr_ldap_init would/could/should be; it's not documented to explicitly *not* be thread-safe, anyway.

The caller must obtain the mutex first, because the caller is responsible
for initialization before releasing the mutex (it wouldn't do to acquire
an uninitialized resource.)  I'll document, as you suggest.

Don't we have an issue if apu_dso_init is called by two threads in parallel
when dsos is still NULL?
IMHO this can happen as load_ldap could be called by two threads in parallel.
BTW: I guess it would be more effective to do the for loop for getting the 
global
pool after checking if dsos != NULL.

Regards

RĂ¼diger