summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2011-09-14 08:13:27 +0930
committerRusty Russell <rusty@rustcorp.com.au>2011-09-14 08:13:27 +0930
commit5de58894c73fc8e58aba0b2b031f468847ec99b8 (patch)
treea169c436028b5cc29415ab785ec9c79a47603a66
parentfbf0783722c226a56f576902dae8576d723df998 (diff)
downloadsamba-5de58894c73fc8e58aba0b2b031f468847ec99b8.tar.gz
samba-5de58894c73fc8e58aba0b2b031f468847ec99b8.tar.bz2
samba-5de58894c73fc8e58aba0b2b031f468847ec99b8.zip
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)
-rw-r--r--lib/tdb2/transaction.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tdb2/transaction.c b/lib/tdb2/transaction.c
index eab00e0937..10f4862c6e 100644
--- a/lib/tdb2/transaction.c
+++ b/lib/tdb2/transaction.c
@@ -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;