summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-03-27 18:00:25 +0100
committerMichael Adam <obnox@samba.org>2008-03-27 18:14:57 +0100
commit04ae7b85ea24310cbef34ac20a0b82bcdb714192 (patch)
treead8ef36707f42034ca4c88a91023a00bb050455f /source3/lib
parentc86d10ae83c4f92d3f382ecd0ea9f6d029cf0612 (diff)
downloadsamba-04ae7b85ea24310cbef34ac20a0b82bcdb714192.tar.gz
samba-04ae7b85ea24310cbef34ac20a0b82bcdb714192.tar.bz2
samba-04ae7b85ea24310cbef34ac20a0b82bcdb714192.zip
dbwrap: fix dbwrap_trans_[delete|store]() to stop when transaction_start() failed.
Michael (This used to be commit ab0aaed907fef233998ff0841d30eabef3263ee8)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/dbwrap_util.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/lib/dbwrap_util.c b/source3/lib/dbwrap_util.c
index 550e5c482b..1572f01723 100644
--- a/source3/lib/dbwrap_util.c
+++ b/source3/lib/dbwrap_util.c
@@ -127,6 +127,7 @@ int dbwrap_trans_store(struct db_context *db, TDB_DATA key, TDB_DATA dbuf,
res = db->transaction_start(db);
if (res != 0) {
DEBUG(5, ("transaction_start failed\n"));
+ return res;
}
rec = db->fetch_locked(db, talloc_tos(), key);
@@ -166,6 +167,7 @@ int dbwrap_trans_delete(struct db_context *db, TDB_DATA key)
res = db->transaction_start(db);
if (res != 0) {
DEBUG(5, ("transaction_start failed\n"));
+ return res;
}
rec = db->fetch_locked(db, talloc_tos(), key);