]> git.sur5r.net Git - openldap/commitdiff
ITS#5649 fix overlay_register_control
authorHoward Chu <hyc@openldap.org>
Sat, 9 Aug 2008 10:11:41 +0000 (10:11 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 9 Aug 2008 10:11:41 +0000 (10:11 +0000)
servers/slapd/backover.c

index 2f23fb0d19dbe0de3181fb024a720ed55f68c1a9..ce69388fa17f5ada292fe2ba1d91e49e6238aabf 100644 (file)
@@ -1063,7 +1063,7 @@ overlay_register_control( BackendDB *be, const char *oid )
                
                /* add to all backends... */
                LDAP_STAILQ_FOREACH( bd, &backendDB, be_next ) {
-                       if ( be == bd ) {
+                       if ( bd == be->bd_self ) {
                                gotit = 1;
                        }
 
@@ -1074,8 +1074,8 @@ overlay_register_control( BackendDB *be, const char *oid )
        }
        
        if ( !gotit ) {
-               be->be_ctrls[ cid ] = 1;
-               be->be_ctrls[ SLAP_MAX_CIDS ] = 1;
+               be->bd_self->be_ctrls[ cid ] = 1;
+               be->bd_self->be_ctrls[ SLAP_MAX_CIDS ] = 1;
        }
 
        return 0;