[Date Prev][Date Next] [Chronological] [Thread] [Top]

Specify a URI with multiple servers?

I'm using OpenLDAP 2.3.24 libldap on linux.

I'm binding to a specific URI (e.g.
ldap://foo:389";) and all works well.

However, I want to specify a sequence of servers, in order, e.g.:
  "ldap://foo:389  ldap://bar:389";

If one server is not available, then move to the next, etc.

As far as I can tell, this is not supported by the OpenLDAP API as-is --
the library does not split the string on whitespace. I don't think calling
ldap_set_option() multiple times will help either.

Is there a way to do this, or is it a matter of iterating a list, and
reacting to a failed attempt to bind() with the next server in the list?

Thanks for your tips