[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: LDAP C API draft - LDAPMessage lifetime?
In my opinion you should make a copy. An implementation of the LDAP API
could tie the LDAPMessage object to the LDAP session handle somehow if
it chose to do so.
-Mark
George Powers wrote:
>
> I don't think that the draft states whether it is legitimate to use
> the results of an LDAP search after calling ldap_unbind(). On the one
> hand, ldap_unbind() invalidates the session handle, but on the other
> hand it does not seem to deallocate the LDAPMessage structure or its
> attached values. So if I have obtained pointers to the attribute values
> before calling ldap_ubind(), can I keep using these values by reference
> and free the LDAPMessage at my convenience, or should I make a copy of
> the values before calling ldap_unbind()?
>
> My guess is the latter, because calls like ldap_first_entry() require a
> session handle...