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

(ITS#7532) File descriptor needed before sending a request

Full_Name: Nathaniel McCallum
Version: git master
OS: fedora rawhide
URL: https://github.com/npmccallum/openldap/commit/4e12a8ca31bcc6ad91f036b9200d704dd223e947
Submission from: (NULL) (

For asynchronous usage, it is common to create a "write" callback and perform
all request sending in this callback from an internal queue. However, since
ldap_open() was deprecated, there is no way to ensure a connection is
established before the request is sent.

This patch adds a function: int ldap_connect(LDAP *ld). You can call this
function immediately after ldap_initialize() to ensure that a file descriptor is
created for polling. No default behaviour changes, so applications that don't
call ldap_connect() will always get the default lazy connection.

The attached file is derived from OpenLDAP Software. All of the modifications
to OpenLDAP Software represented in the following patch(es) were developed by
Red Hat. Red Hat has not assigned rights and/or interest in this work to any
party. I, Nathaniel McCallum am authorized by Red Hat, my employer, to release
this work
under the following terms.

Red Hat hereby places the following modifications to OpenLDAP Software (and only
these modifications) into the public domain. Hence, these modifications may be
freely used and/or redistributed for any purpose with or without attribution
and/or other notice.