Fixes to lock nesting code.

This commit is contained in:
Nicolas Williams
2011-07-14 23:34:20 -05:00
committed by Nicolas Williams
parent 58d72035f1
commit abd94953e2
3 changed files with 8 additions and 8 deletions

View File

@@ -68,9 +68,9 @@ DB_lock(krb5_context context, HDB *db, int operation)
krb5_error_code ret;
if (db->lock_count > 0) {
assert( db->lock_type == HDB_WLOCK );
db->lock_count++;
return 0;
if (db->lock_type == HDB_WLOCK || db->lock_type == operation)
return 0;
}
if(fd < 0) {