Claudio Jeker ([EMAIL PROTECTED]) wrote: > > > > OpenLDAP 1.x libs only speak LDAPv2 protocol - no need for > > ldap_set_option() > > > > It also has no ldap_set_option() symbol defined.
Correct. > > According to the RFC 2251 section 4.2, applications today should first > > attempt to do an LDAPv3 connect and if unsuccessful, then they should close > > the connection and do an LDAPv2 connect. > > > > This is was your code does. Does anybody know if there is a ldap-sdk that > tries to connect using LDAPv1 protocol or needs an explicit call to > ldap_set_option() to get a correct connection? Netscape / Sun ? The current Netscape/Sun ONE C LDAP SDK uses the same ldap_set_option() calls as does OpenLDAP 2.x libs. LDAPv1 protocol never existed as an RFC. I have never seen anything related to LDAPv1. I think you are still confused about this protocol versioning versus software versioning. > > The error is not an error and so the qldap_errno is overridden by the next > error. Therfor I think it is impossible to get the LDAP_VERSION_ERROR. > We will see... > The point is to differentiate between an error message of anything else and a response that you attempted to connect with LDAPv3 to a server that only speaks LDAPv2, so that the code will either exit or continue to attempt connecting with a lower protocol version. -- Mike
