summaryrefslogtreecommitdiff
path: root/lib
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
commit67164070d5bb6697ee139b20121656670b579cdf (patch)
treec32e3ecc2d263147901a31964f9d6ae2797a9dee /lib
parent5de58894c73fc8e58aba0b2b031f468847ec99b8 (diff)
downloadsamba-67164070d5bb6697ee139b20121656670b579cdf.tar.gz
samba-67164070d5bb6697ee139b20121656670b579cdf.tar.bz2
samba-67164070d5bb6697ee139b20121656670b579cdf.zip
tdb2: fix error handling for tdb1_transaction_commit.
tdb_repack() returns an enum TDB_ERROR, whereas tdb1_transaction_commit is expected to return 0 or -1. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit b679512e4260b9847e2f846b07443e6907d8276f)
Diffstat (limited to 'lib')
-rw-r--r--lib/tdb2/tdb1_transaction.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/tdb2/tdb1_transaction.c b/lib/tdb2/tdb1_transaction.c
index 6e39de33f4..157642a632 100644
--- a/lib/tdb2/tdb1_transaction.c
+++ b/lib/tdb2/tdb1_transaction.c
@@ -1174,7 +1174,8 @@ int tdb1_transaction_commit(struct tdb_context *tdb)
_tdb1_transaction_cancel(tdb);
if (need_repack) {
- return tdb_repack(tdb);
+ if (tdb_repack(tdb) != 0)
+ return -1;
}
return 0;