Commit 65c08985 authored by Quanah Gibson-Mount's avatar Quanah Gibson-Mount
Browse files


parent c759bc39
......@@ -30,6 +30,21 @@ LDAP **ldp;
char *uri;
.ft B
int ldap_set_urllist_proc(ld, proc, params)
LDAP *ld;
void *params;
.ft B
int (LDAP_URLLIST_PROC)(ld, urllist, url, params);
LDAP *ld;
LDAPURLDesc **urllist;
LDAPURLDesc **url;
void *params;
.ft B
#include <ldap_pvt.h>
.ft B
......@@ -140,6 +155,23 @@ was built with LDAP_CONNECTIONLESS defined.
.I uri
parameter may optionally be provided for informational purposes.
.B ldap_set_urllist_proc()
allows to set a function
.I proc
of type
that is called when a successful connection can be established.
This function receives the list of URIs parsed from the
.I uri
string originally passed to
.BR ldap_initialize() ,
and the one that successfully connected.
The function may manipulate the URI list; the typical use consists
in moving the successful URI to the head of the list,
so that subsequent attempts to connect to one of the URIs using the same LDAP handle
will try it first.
By default, this function is not defined.
Note: the first call into the LDAP library also initializes the global
options for the library. As such the first call should be single-threaded
......@@ -168,6 +200,8 @@ will directly return the LDAP code associated to the error (or
in case of success);
.I errno
should be set as well whenever appropriate.
.B ldap_set_urllist_proc()
returns LDAP_OPT_ERROR on error, and LDAP_OPT_SUCCESS on success.
.BR ldap (3),
.BR ldap_bind (3),
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment