From b57450bd970ddb036c42739a1b074b1c8b6231cd Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Mon, 12 Feb 2007 11:40:57 +0000 Subject: [PATCH] ITS#4662 note requirements for global option initialization --- doc/man/man3/ldap_open.3 | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/doc/man/man3/ldap_open.3 b/doc/man/man3/ldap_open.3 index aae3acec1c..3402eb7862 100644 --- a/doc/man/man3/ldap_open.3 +++ b/doc/man/man3/ldap_open.3 @@ -107,13 +107,10 @@ and it explicitly returns an error code. allows an LDAP structure to be initialized using an already-opened connection. The .I proto -parameter should be one of -.BR LDAP_PROTO_TCP , -.BR LDAP_PROTO_UDP , -or -.B LDAP_PROTO_IPC +parameter should be one of LDAP_PROTO_TCP, LDAP_PROTO_UDP, +or LDAP_PROTO_IPC for a connection using TCP, UDP, or IPC, respectively. The value -.B LDAP_PROTO_EXT +LDAP_PROTO_EXT may also be specified if user-supplied sockbuf handlers are going to be used. Note that support for UDP is not implemented unless libldap was built with LDAP_CONNECTIONLESS defined. @@ -121,6 +118,17 @@ The .I uri parameter may optionally be provided for informational purposes. +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 +or otherwise protected to insure that only one call is active. It is +recommended that +.BR ldap_get_option () +or +.BR ldap_set_option () +be used in the program's main thread before any additional threads are created. +See +.BR ldap_get_option (3). + .SH ERRORS If an error occurs, .B ldap_open() -- 2.39.2