]> git.sur5r.net Git - openldap/commitdiff
Apparently working slapadd!
authorKurt Zeilenga <kurt@openldap.org>
Tue, 26 Sep 2000 04:28:17 +0000 (04:28 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Tue, 26 Sep 2000 04:28:17 +0000 (04:28 +0000)
servers/slapd/back-bdb/idl.c

index fd8c7b88046e424c3748be04e4bbee51fd22268f..eff46e62fd5b36872f76d4caf9cf15cb13456c54 100644 (file)
@@ -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;