From: Kurt Zeilenga Date: Sat, 8 Feb 2003 01:34:27 +0000 (+0000) Subject: Reword BDB 4.0 bug comment now that configure requires BDB 4.1 X-Git-Tag: NO_SLAP_OP_BLOCKS~405 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d1287dd34117032655a038d7f71394942158048e;p=openldap Reword BDB 4.0 bug comment now that configure requires BDB 4.1 --- diff --git a/servers/slapd/back-bdb/idl.c b/servers/slapd/back-bdb/idl.c index 3e50644638..0b463f7a56 100644 --- a/servers/slapd/back-bdb/idl.c +++ b/servers/slapd/back-bdb/idl.c @@ -304,15 +304,19 @@ bdb_idl_fetch_key( bdb_idl_cache_entry_t idl_tmp; #endif - /* buf must be large enough to grab the entire IDL in one - * get(), otherwise BDB 4 will leak resources on subsequent - * get's. We can safely call get() twice - once for the data, - * and once to get the DB_NOTFOUND result meaning there's - * no more data. See ITS#2040 for details. This bug is fixed - * in BDB 4.1 so a smaller buffer will work if stack space is - * too limited. + /* If using BerkeleyDB 4.0, the buf must be large enough to + * grab the entire IDL in one get(), otherwise BDB will leak + * resources on subsequent get's. We can safely call get() + * twice - once for the data, and once to get the DB_NOTFOUND + * result meaning there's no more data. See ITS#2040 for details. + * This bug is fixed in BDB 4.1 so a smaller buffer will work if + * stack space is too limited. + * + * configure now requires Berkeley DB 4.1. + * if using 4.0, set BDB_ENOUGH to 5 */ - ID buf[BDB_IDL_DB_SIZE*5]; +#define BDB_ENOUGH 1 + ID buf[BDB_IDL_DB_SIZE*BDB_ENOUGH]; char keybuf[16];