svn commit: samba r21263 - in branches: SAMBA_3_0/source/lib SAMBA_3_0_25/source/lib

Volker Lendecke Volker.Lendecke at SerNet.DE
Fri Feb 9 21:42:17 GMT 2007


On Fri, Feb 09, 2007 at 04:34:37PM -0500, derrell at samba.org wrote:
> Definitely bad.  There's no call to getpeername() in another_ldap_try(), and I
> don't see what change you made to solve this problem.  How do you now properly
> detect that the peer closed the connection?

Sorry, the call to getpeername is in the function
getpeername(). And the detection if the connection is down
is being done by the the ldap library, we detect it by the
following code snippet:

    if (ld_errno == LDAP_SERVER_DOWN) {
            ldap_unbind(ldap_state->ldap_struct);
            ldap_state->ldap_struct = NULL;
    }

Doing the unbind and setting the ldap_struct to NULL forces
smbldap_open to definitely retry.

Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20070209/05eff7f8/attachment.bin


More information about the samba-technical mailing list