]> git.sur5r.net Git - openldap/commitdiff
Fix HDB - don't use IDL cache when it's not configured
authorHoward Chu <hyc@openldap.org>
Thu, 4 Jan 2007 10:56:18 +0000 (10:56 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 4 Jan 2007 10:56:18 +0000 (10:56 +0000)
servers/slapd/back-bdb/dn2id.c

index a1670944ba01fb902c7976859999e45c1e7b1e38..c4f7cfac5e5355317bc75b5bdbe58c5c9d7828c2 100644 (file)
@@ -1122,7 +1122,8 @@ hdb_dn2idl(
                cx.key.size = sizeof(ID)+1;
                *ptr = cx.prefix;
                cx.id = e->e_id;
-               bdb_idl_cache_put( cx.bdb, cx.db, &cx.key, cx.ids, cx.rc );
+               if ( cx.bdb->bi_idl_cache_max_size )
+                       bdb_idl_cache_put( cx.bdb, cx.db, &cx.key, cx.ids, cx.rc );
        }
 
        if ( cx.rc == DB_NOTFOUND )