]> git.sur5r.net Git - openldap/commitdiff
fix previous commit (needs work)
authorPierangelo Masarati <ando@openldap.org>
Sat, 10 Jul 2004 15:15:01 +0000 (15:15 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 10 Jul 2004 15:15:01 +0000 (15:15 +0000)
servers/slapd/overlays/pcache.c

index da40810e0056b20eb0327d9f4405a63a59c10041..2238e4eec81d2843ee17761c54653b5ba2499e22 100644 (file)
@@ -1877,7 +1877,35 @@ proxy_cache_open(
                return rc;
        }
 
+       /* FIXME: this is a duplication of code that is present
+        * in backend_startup(); however, backend_startup() can
+        * be called only once, and it is already called by slapd
+        * for all backends and databases, while the proxy cache
+        * database does not exist until the overlay is started,
+        * and back-bdb/back-hdb need the be_context_csn field.
+        */
+#if 0
        rc = backend_startup( &cm->db );
+#endif
+
+       /* startup a specific backend database */
+       cm->db.be_pending_csn_list = (struct be_pcl *)
+               ch_calloc( 1, sizeof( struct be_pcl ));
+       build_new_dn( &cm->db.be_context_csn, cm->db.be_nsuffix,
+               (struct berval *)&slap_ldapsync_cn_bv, NULL );
+
+       LDAP_TAILQ_INIT( cm->db.be_pending_csn_list );
+
+#ifdef NEW_LOGGING
+       LDAP_LOG( BACKEND, DETAIL1, "proxy_cache_open:  starting \"%s\"\n",
+               cm->db.be_suffix ? cm->db.be_suffix[0].bv_val : "(unknown)",
+               0, 0 );
+#else
+       Debug( LDAP_DEBUG_TRACE,
+               "proxy_cache_open: starting \"%s\"\n",
+               cm->db.be_suffix ? cm->db.be_suffix[0].bv_val : "(unknown)",
+               0, 0 );
+#endif
 
        if ( rc != 0 ) {
                return rc;