enum TDB_ERROR ecode;
tdb_bool_err berr;
+ if (tdb->flags & TDB_VERSION1) {
+ if (tdb1_allrecord_lock(tdb, ltype, flags, upgradable) == -1)
+ return tdb->last_error;
+ return TDB_SUCCESS;
+ }
+
if (tdb->flags & TDB_NOLOCK)
return TDB_SUCCESS;
/* unlock entire db */
void tdb_allrecord_unlock(struct tdb_context *tdb, int ltype)
{
+ if (tdb->flags & TDB_VERSION1) {
+ tdb1_allrecord_unlock(tdb, ltype);
+ return;
+ }
+
if (tdb->flags & TDB_NOLOCK)
return;
while (tdb->file->allrecord_lock.count
&& tdb->file->allrecord_lock.owner == tdb) {
- if (tdb->flags & TDB_VERSION1)
- tdb1_allrecord_unlock(tdb,
- tdb->file->allrecord_lock.ltype);
- else
- tdb_allrecord_unlock(tdb,
- tdb->file->allrecord_lock.ltype);
+ tdb_allrecord_unlock(tdb, tdb->file->allrecord_lock.ltype);
}
for (i=0; i<tdb->file->num_lockrecs; i++) {