1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-15 05:57:49 +03:00

tdb2: don't return -1 (ie. TDB_ERR_CORRUPT) on transaction write fail.

A left-over -1 return; should be returning ecode (probably TDB_ERR_IO).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit 077bdae6877d26749987b26a1b5b28cdba5ebbdd)
This commit is contained in:
Rusty Russell 2011-09-14 08:13:27 +09:30
parent fbf0783722
commit 5de58894c7

View File

@ -203,7 +203,7 @@ static enum TDB_ERROR transaction_write(struct tdb_context *tdb, tdb_off_t off,
tdb_len_t len2 = PAGESIZE - (off % PAGESIZE);
ecode = transaction_write(tdb, off, buf, len2);
if (ecode != TDB_SUCCESS) {
return -1;
return ecode;
}
len -= len2;
off += len2;