]> git.sur5r.net Git - openldap/commitdiff
ITS#3201 fix conflict with BDB internal locks
authorHoward Chu <hyc@openldap.org>
Thu, 24 Jun 2004 23:35:18 +0000 (23:35 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 24 Jun 2004 23:35:18 +0000 (23:35 +0000)
servers/slapd/back-bdb/cache.c

index c25a9357e26931ff638e68e852b22621791965ce..8e5dcf995f5d50a870ca5e60406f7b013984c7fa 100644 (file)
@@ -75,7 +75,7 @@ bdb_cache_entry_db_relock(
        if ( !lock ) return 0;
 
        lockobj.data = &ei->bei_id;
-       lockobj.size = sizeof(ei->bei_id);
+       lockobj.size = sizeof(ei->bei_id) + 1;
 
        list[0].op = DB_LOCK_PUT;
        list[0].lock = *lock;
@@ -122,7 +122,7 @@ bdb_cache_entry_db_lock( DB_ENV *env, u_int32_t locker, EntryInfo *ei,
                db_rw = DB_LOCK_READ;
 
        lockobj.data = &ei->bei_id;
-       lockobj.size = sizeof(ei->bei_id);
+       lockobj.size = sizeof(ei->bei_id) + 1;
 
        rc = LOCK_GET(env, locker, tryOnly ? DB_LOCK_NOWAIT : 0,
                                        &lockobj, db_rw, lock);