From e2c2ff8deb2e272a63bad7aaef8c739beb645f9c Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 26 Sep 2000 04:28:17 +0000 Subject: [PATCH] Apparently working slapadd! --- servers/slapd/back-bdb/idl.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/servers/slapd/back-bdb/idl.c b/servers/slapd/back-bdb/idl.c index fd8c7b8804..eff46e62fd 100644 --- a/servers/slapd/back-bdb/idl.c +++ b/servers/slapd/back-bdb/idl.c @@ -68,12 +68,12 @@ static int idl_insert( ID *ids, ID id ) assert( x > 0 ); - if( x <= 0 ) { + if( x < 1 ) { /* internal error */ - return -1; + return -2; } - if ( ids[x] == id ) { + if ( x <= ids[0] && ids[x] == id ) { /* duplicate */ return -1; } @@ -130,6 +130,11 @@ bdb_idl_insert_key( ID ids[BDB_IDL_DB_SIZE]; DBT data; + /* for printable keys only */ + Debug( LDAP_DEBUG_ARGS, + "=> bdb_idl_insert_key: %s %ld\n", + key->data, (long) id, 0 ); + assert( id != NOID ); data.data = ids; @@ -207,6 +212,11 @@ bdb_idl_delete_key( ID ids[BDB_IDL_DB_SIZE]; DBT data; + /* for printable keys only */ + Debug( LDAP_DEBUG_ARGS, + "=> bdb_idl_delete_key: %s %ld\n", + key->data, (long) id, 0 ); + assert( id != NOID ); data.data = ids; -- 2.39.5