Author: gd Date: 2004-12-20 18:42:58 +0000 (Mon, 20 Dec 2004) New Revision: 4289
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4289 Log: Close LDAP-Connection before retrying to open a new connection in the retry-loop. This fixes a deadlock-situation when ldapsam is used with the ldapi interface: getpeername won't fail while trying to detect dead connections on unix domain sockets. When the ldapi-connection was closed server-side (due to OpenLDAP's idletimeout) we *never* got a new LDAP connection. Guenther Modified: branches/SAMBA_3_0/source/lib/smbldap.c trunk/source/lib/smbldap.c Changeset: Modified: branches/SAMBA_3_0/source/lib/smbldap.c =================================================================== --- branches/SAMBA_3_0/source/lib/smbldap.c 2004-12-20 14:37:54 UTC (rev 4288) +++ branches/SAMBA_3_0/source/lib/smbldap.c 2004-12-20 18:42:58 UTC (rev 4289) @@ -977,6 +977,7 @@ *attempts += 1; + smbldap_close(ldap_state); open_rc = smbldap_open(ldap_state); if (open_rc == LDAP_SUCCESS) { Modified: trunk/source/lib/smbldap.c =================================================================== --- trunk/source/lib/smbldap.c 2004-12-20 14:37:54 UTC (rev 4288) +++ trunk/source/lib/smbldap.c 2004-12-20 18:42:58 UTC (rev 4289) @@ -999,6 +999,7 @@ *attempts += 1; + smbldap_close(ldap_state); open_rc = smbldap_open(ldap_state); if (open_rc == LDAP_SUCCESS) {