]> git.sur5r.net Git - openldap/commitdiff
fix rev 1.125 commit
authorPierangelo Masarati <ando@openldap.org>
Wed, 17 May 2006 22:13:39 +0000 (22:13 +0000)
committerPierangelo Masarati <ando@openldap.org>
Wed, 17 May 2006 22:13:39 +0000 (22:13 +0000)
libraries/libldap/request.c

index 2fa9f0f8abf6e4f37781b627d38e2d2e3e9cc139..48e2b0e2d820883374b7235932c8872cffc3a465 100644 (file)
@@ -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;
                                }