summaryrefslogtreecommitdiff
path: root/source3/registry
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2009-07-07 11:41:08 +0200
committerMichael Adam <obnox@samba.org>2009-07-15 14:01:46 +0200
commit3409a44da2ee6a0ca2caaf0455e0095f8e2f80a4 (patch)
treef929b0bd731399afa47f529d7657b82a51c97ff3 /source3/registry
parent1dfaa371fa027351a0af6e56a04bc045c3b0dc73 (diff)
downloadsamba-3409a44da2ee6a0ca2caaf0455e0095f8e2f80a4.tar.gz
samba-3409a44da2ee6a0ca2caaf0455e0095f8e2f80a4.tar.bz2
samba-3409a44da2ee6a0ca2caaf0455e0095f8e2f80a4.zip
s3:registry: don't use exported transaction wrappers in regdb_create_subkey()
So that the regdb handle is again explicit and the core of the function can be abstracted. Michael
Diffstat (limited to 'source3/registry')
-rw-r--r--source3/registry/reg_backend_db.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c
index 78ac64d5c1..6763558b0d 100644
--- a/source3/registry/reg_backend_db.c
+++ b/source3/registry/reg_backend_db.c
@@ -929,8 +929,10 @@ static WERROR regdb_create_subkey(const char *key, const char *subkey)
talloc_free(subkeys);
- werr = regdb_transaction_start();
- W_ERROR_NOT_OK_GOTO_DONE(werr);
+ if (regdb->transaction_start(regdb) != 0) {
+ werr = WERR_REG_IO_FAILURE;
+ goto done;
+ }
werr = regsubkey_ctr_init(mem_ctx, &subkeys);
W_ERROR_NOT_OK_GOTO(werr, cancel);
@@ -950,19 +952,17 @@ static WERROR regdb_create_subkey(const char *key, const char *subkey)
goto cancel;
}
- werr = regdb_transaction_commit();
- if (!W_ERROR_IS_OK(werr)) {
- DEBUG(0, (__location__ " failed to commit transaction: %s\n",
- win_errstr(werr)));
+ if (regdb->transaction_commit(regdb) != 0) {
+ werr = WERR_REG_IO_FAILURE;
+ DEBUG(0, (__location__ " failed to commit transaction\n"));
}
goto done;
cancel:
- werr = regdb_transaction_cancel();
- if (!W_ERROR_IS_OK(werr)) {
- DEBUG(0, (__location__ " failed to cancel transaction: %s\n",
- win_errstr(werr)));
+ if (regdb->transaction_cancel(regdb) != 0) {
+ werr = WERR_REG_IO_FAILURE;
+ DEBUG(0, (__location__ " failed to cancel transaction\n"));
}
done: