From 689f42af29572d1d9e135c0d20e07fb690a6d2d4 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Sun, 14 Aug 2011 23:48:41 +0200 Subject: s3:registry: enhance debugging of deletekey_recursive Autobuild-User: Michael Adam Autobuild-Date: Mon Aug 15 19:34:44 CEST 2011 on sn-devel-104 --- source3/registry/reg_api.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'source3/registry') diff --git a/source3/registry/reg_api.c b/source3/registry/reg_api.c index 289f77df76..372f2d396e 100644 --- a/source3/registry/reg_api.c +++ b/source3/registry/reg_api.c @@ -815,9 +815,15 @@ static WERROR reg_deletekey_recursive_internal(struct registry_key *parent, uint32 i; TALLOC_CTX *mem_ctx = talloc_stackframe(); + DEBUG(5, ("reg_deletekey_recursive_internal: deleting '%s' from '%s'\n", + path, parent->key->name)); + /* recurse through subkeys first */ werr = reg_openkey(mem_ctx, parent, path, REG_KEY_ALL, &key); if (!W_ERROR_IS_OK(werr)) { + DEBUG(3, ("reg_deletekey_recursive_internal: error opening " + "subkey '%s' of '%s': '%s'\n", + path, parent->key->name, win_errstr(werr))); goto done; } @@ -840,6 +846,10 @@ static WERROR reg_deletekey_recursive_internal(struct registry_key *parent, } done: + + DEBUG(5, ("reg_deletekey_recursive_internal: done deleting '%s' from " + "'%s': %s\n", + path, parent->key->name, win_errstr(werr))); TALLOC_FREE(mem_ctx); return werr; } @@ -883,6 +893,10 @@ static WERROR reg_deletekey_recursive_trans(struct registry_key *parent, DEBUG(0, ("reg_deletekey_recursive_trans: " "error committing transaction: %s\n", win_errstr(werr))); + } else { + DEBUG(5, ("reg_reletekey_recursive_trans: deleted key '%s' from '%s'\n", + path, parent->key->name)); + } } -- cgit