summaryrefslogtreecommitdiff
path: root/source3/registry
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2011-05-11 14:53:48 +0200
committerVolker Lendecke <vl@samba.org>2011-05-12 11:48:30 +0200
commitb1eac2daf38703a2e206ec3b4d577889f6d3f5c0 (patch)
tree0cefd48b6ecfcac802982586335e94e999bef7a4 /source3/registry
parentf5f9355ebe9f1d818846e70fe178bc4eacd14f0a (diff)
downloadsamba-b1eac2daf38703a2e206ec3b4d577889f6d3f5c0.tar.gz
samba-b1eac2daf38703a2e206ec3b4d577889f6d3f5c0.tar.bz2
samba-b1eac2daf38703a2e206ec3b4d577889f6d3f5c0.zip
s3:registry: turn create_sorted_subkeys_internal to NTSTATUS return type
(from bool)
Diffstat (limited to 'source3/registry')
-rw-r--r--source3/registry/reg_backend_db.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c
index d76b71ac37..b99ef916a5 100644
--- a/source3/registry/reg_backend_db.c
+++ b/source3/registry/reg_backend_db.c
@@ -1408,8 +1408,8 @@ done:
return status;
}
-static bool create_sorted_subkeys_internal(const char *key,
- const char *sorted_keyname)
+static NTSTATUS create_sorted_subkeys_internal(const char *key,
+ const char *sorted_keyname)
{
NTSTATUS status;
struct create_sorted_subkeys_context sorted_ctx;
@@ -1421,7 +1421,7 @@ static bool create_sorted_subkeys_internal(const char *key,
create_sorted_subkeys_action,
&sorted_ctx);
- return NT_STATUS_IS_OK(status);
+ return status;
}
struct scan_subkey_state {
@@ -1501,13 +1501,16 @@ static bool scan_parent_subkeys(struct db_context *db, const char *parent,
if (state.scanned) {
result = state.found;
} else {
+ NTSTATUS status;
+
res = db->transaction_start(db);
if (res != 0) {
DEBUG(0, ("error starting transaction\n"));
goto fail;
}
- if (!create_sorted_subkeys_internal(path, key)) {
+ status = create_sorted_subkeys_internal(path, key);
+ if (!NT_STATUS_IS_OK(status)) {
res = db->transaction_cancel(db);
if (res != 0) {
smb_panic("Failed to cancel transaction.");