[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
RE: Error to get LDAP_OPT_API_INFO
My version of openldap is 2.1.8 and
its development tree contains a program named apitest
located in ./libraries/libldap.
apitest.c contains samples of numerous calls as well
as showing what the compile-time and execution
time parms are.
You might take a look at it if it is present in
your version.
-tony
> -----Original Message-----
> From: German Poo Caaman~o [mailto:gpoo@ubiobio.cl]
> Sent: Tuesday, January 14, 2003 8:28 PM
> To: openldap-software@OpenLDAP.org
> Subject: Re: Error to get LDAP_OPT_API_INFO
>
>
> El mié, 15-01-2003 a las 00:15, German Poo Caaman~o escribió:
> > Hello,
> >
> > I'm trying to get the version with a small C program,
> > however ldap_get_options always returns an error, I'm
> > still can't see where is the problem. I can get other
> > options, such as, LDAP_OPT_HOST_NAME, but not the version.
> >
> > I made an small test program, quite simple. I'll appreaciate
> > any hint.
> >
> > My server:
> > ii slapd 2.0.27-3 OpenLDAP server (slapd).
>
> Well, After that I took a look the source code of
> libraries/libldap/options.c
> (ldap_get_option implementation), at line 109 the following code:
>
> switch(option) {
> case LDAP_OPT_API_INFO: {
> struct ldapapiinfo *info = (struct ldapapiinfo *) outvalue;
>
> if(info == NULL) {
> /* outvalue must point to an apiinfo structure /
> return LDAP_OPT_ERROR; }
>
> if(info->ldapai_info_version != LDAP_API_INFO_VERSION) {
> /* api info version mismatch */
> info->ldapai_info_version = LDAP_API_INFO_VERSION;
> return LDAP_OPT_ERROR;
> }
> ...
>
> I set:
>
> ldapinfo.ldapai_info_version = LDAP_API_INFO_VERSION;
>
> before to call ldap_get_option, and it works. However,
> I'm getting:
>
> vendor: OpenLDAP version: 20026
>
> I was expecting 20027.
>
> Thanks.
>
> --
> German Poo Caaman~o
> mailto:gpoo@ubiobio.cl
> http://www.ubiobio.cl/~gpoo/chilelindo.html
> "Hay 10 tipos de personas: las que entienden binario y las que no."
>