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

Re: Is ldap_bind() mandatory before each ldap_search() call?

On Tue, Nov 9, 2010 at 11:37 AM, Shankar Anand R <shankaranand@gmail.com> wrote:
> My question is how long does the connection stay valid?

Too many variables involved to answer that question.  Client software,
server software, policies of intervening network equipment and/or

> Is failure of  the operation the only way for the client to know that the connection has
> expired?

IME, yes.  You have to try some operation to get an indication that
there's a problem with the connection.  And then you have to  examine
the specific error response you get to determine that it's not a
malformed filter or something else.

The details of the response vary among different server
implementations.  This being an OpenLDAP list, someone may have the
details you need for the particular case of slapd.  For what it's
worth, when using ActiveDirectory and eDirectory, I've so far not run
into a case where a re-bind sufficed; I always have to close the whole
connection and reconnect.

Mark J. Reed <markjreed@gmail.com>