]> git.sur5r.net Git - openldap/commitdiff
allow slapo-chain to be instantiated without any specific config statement...
authorPierangelo Masarati <ando@openldap.org>
Fri, 13 Jan 2006 10:41:54 +0000 (10:41 +0000)
committerPierangelo Masarati <ando@openldap.org>
Fri, 13 Jan 2006 10:41:54 +0000 (10:41 +0000)
servers/slapd/back-ldap/chain.c

index 64f5bb5fc38adfb3423bfab39b0eb6a180a87f78..ddcc2a231cbf2280687ff8e0dc1940c51d610d51 100644 (file)
@@ -1500,6 +1500,9 @@ static int
 ldap_chain_db_open(
        BackendDB       *be )
 {
+       slap_overinst   *on = (slap_overinst *) be->bd_info;
+       ldap_chain_t    *lc = (ldap_chain_t *)on->on_bi.bi_private;
+
 #ifdef LDAP_CONTROL_X_CHAINING_BEHAVIOR
        int     rc = 0;
 
@@ -1509,6 +1512,13 @@ ldap_chain_db_open(
        }
 #endif /* LDAP_CONTROL_X_CHAINING_BEHAVIOR */
 
+       if ( lc->lc_common_li == NULL ) {
+               void    *be_private = be->be_private;
+               ldap_chain_db_init_common( be );
+               lc->lc_common_li = lc->lc_cfg_li = (ldapinfo_t *)be->be_private;
+               be->be_private = be_private;
+       }
+
        return ldap_chain_db_func( be, db_open );
 }