On 11.04.2008 01:34, Brad Nicholes wrote:
It is protected by the code at the beginning of util_ldap_post_config()
that calls apr_pool_userdata_get() and checks a user data tag. If the
tag is empty then this is the first time that the function was called.
It then puts something in the tag and returns. The next time it reads
the user data tag, it finds what it put there the first time. Now it
knows that this is the second time and goes ahead with initializations.
This is actually the preferred way to do it rather than using a static
variable. Static global variables only work on platforms that have
process separation for data areas. NetWare *isn't* one of those
platforms. A global variable is global to everything running on the
box. That was why I had to make the other NetWare specific changes in
ldap_rebind.c. Static globals are bad. :(
As always thanks for the detailed explanation and the hints for solving
this kind of problem in a platform independent manner. Now I am all fine
with this.
Regards
RĂ¼diger