From: Pierangelo Masarati Date: Wed, 17 May 2006 22:13:39 +0000 (+0000) Subject: fix rev 1.125 commit X-Git-Tag: OPENLDAP_REL_ENG_2_4_3ALPHA~9^2~249 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2b29cf49093979149ee23a10049ec4ab9af79a9f;p=openldap fix rev 1.125 commit --- diff --git a/libraries/libldap/request.c b/libraries/libldap/request.c index 2fa9f0f8ab..48e2b0e2d8 100644 --- a/libraries/libldap/request.c +++ b/libraries/libldap/request.c @@ -1175,12 +1175,12 @@ ldap_chase_referrals( LDAP *ld, LDAPRequest *lp; int looped = 0; int len = srv->lud_dn ? strlen( srv->lud_dn ) : 0; - for (lp = lr; lp; lp = lp->lr_parent ) { + for ( lp = lr; lp; lp = lp->lr_parent ) { if ( lp->lr_conn == lc - && len == lp->lr_dn.bv_len - && len - && strncmp( srv->lud_dn, lp->lr_dn.bv_val, len ) == 0 ) + && len == lp->lr_dn.bv_len ) { + if ( len && strncmp( srv->lud_dn, lp->lr_dn.bv_val, len ) ) + continue; looped = 1; break; }