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;
}
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;
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;