]> git.sur5r.net Git - openldap/commitdiff
Fix (temporary) crash on ldbm
authorHoward Chu <hyc@openldap.org>
Mon, 9 May 2005 11:20:24 +0000 (11:20 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 9 May 2005 11:20:24 +0000 (11:20 +0000)
servers/slapd/overlays/pcache.c

index b6f433b5cc008a20d5a3edd712f03f2dbfb92292..1111e32294f536c8c32a2172987885174bd4e85a 100644 (file)
@@ -1652,8 +1652,12 @@ pc_cfadd( Operation *op, SlapReply *rs, Entry *p, ConfigArgs *ca )
        bv.bv_len = sprintf( ca->msg, "olcDatabase=%s", cm->db.bd_info->bi_type );
        bv.bv_val = ca->msg;
        ca->be = &cm->db;
-       config_build_entry( op, rs, pe, ca, &bv, cm->db.bd_info->bi_cf_ocs,
-               &pcocs[1] );
+
+       /* We can only create this entry if the database is table-driven
+        */
+       if ( cm->db.bd_info->bi_cf_ocs )
+               config_build_entry( op, rs, pe, ca, &bv, cm->db.bd_info->bi_cf_ocs,
+                       &pcocs[1] );
 
        return 0;
 }