]> git.sur5r.net Git - openldap/commitdiff
move supported controls listing at backend startup; allow supported controls to be...
authorPierangelo Masarati <ando@openldap.org>
Wed, 26 Jan 2005 09:53:29 +0000 (09:53 +0000)
committerPierangelo Masarati <ando@openldap.org>
Wed, 26 Jan 2005 09:53:29 +0000 (09:53 +0000)
servers/slapd/backend.c

index 032a816567cb55f22291311203b3576058edbefc..62426a13c5044b8fee1988df5d8cd67553b6ad78 100644 (file)
@@ -185,6 +185,20 @@ int backend_startup_one(Backend *be)
                                rc, 0, 0 );
                }
        }
+
+       /* back-relay takes care of itself; so may do other */
+       if ( be->be_controls == NULL ) {
+               BackendInfo     *bi = be->bd_info;
+       
+               if ( overlay_is_over( be ) ) {
+                       bi = ((slap_overinfo *)be->bd_info->bi_private)->oi_orig;
+               }
+
+               if ( bi->bi_controls ) {
+                       be->be_controls = ldap_charray_dup( bi->bi_controls );
+               }
+       }
+
        return rc;
 }
 
@@ -504,10 +518,6 @@ backend_db_init(
 
        be->bd_info = bi;
 
-       if ( bi->bi_controls ) {
-               be->be_controls = ldap_charray_dup( bi->bi_controls );
-       }
-
        be->be_def_limit = frontendDB->be_def_limit;
        be->be_dfltaccess = frontendDB->be_dfltaccess;