[Date Prev][Date Next]
Re: library questions: LDAPMessage, msgid, ...
Paul Jarc writes:
> First, is this the right list for help with the client library?
> I'm working on an extension library for GNU Guile using the OpenLDAP
> client library. So C objects such as LDAP*, LDAPMessage*, and msgid
> (did I miss any?) will be accessible as Scheme objects.
msgid is just a 32-bit integer.
There are also:
struct berval - strings which may include null bytes,
LDAPControl - server and client controls,
BerElement* - used for internal data in ldap_<first/next>_attribute,
I don't know if your Scheme implementation will
struct timeval - used for timeout of ldap_search_st() and others.
Maybe you'll just use a real number or nil for that.
LDAPAPIInfo - provide data about the LDAP implementation to caller,
struct ldapmod - data with modifications sent by caller to LDAP.
> I'm wondering about lifetime issues. Suppose an LDAP* object is
> destroyed with ldap_unbind() while there are still LDAPMessage* and
> msgid objects lying around. What happens to them?
I don't know if data in an LDAPMessage* may point at data in an LDAP*
though, so perhaps you had better not use the LDAPMessage* (other than
destroying it) after destroying the LDAP*.
> Am I responsible for destroying them first?
You are responsible for destroying them, but I don't think you need to
destroy them _before_ the LDAP* if you don't want to. Though I prefer
to do it that way myself, it seems cleaner.
> Are they automatically destroyed?
> Also, is there any documentation giving a big-picture view of how a
> query, etc., works at the C level? The man pages aren't quite as
> illuminating as I'd like.
summarizes it. I don't know if it says more than the manpages.