diff options
author | Michael Adam <obnox@samba.org> | 2008-04-13 00:54:44 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-04-13 01:43:42 +0200 |
commit | 413c2e9b0aed25ef49b4344c1aec145d0e45a51e (patch) | |
tree | 99fdbd0329245d4e73b5f3e3ae3981c8d0819e01 /source3/registry/reg_api.c | |
parent | a75421b0190763e5e482db215d8b1e6052bdcc19 (diff) | |
download | samba-413c2e9b0aed25ef49b4344c1aec145d0e45a51e.tar.gz samba-413c2e9b0aed25ef49b4344c1aec145d0e45a51e.tar.bz2 samba-413c2e9b0aed25ef49b4344c1aec145d0e45a51e.zip |
registry: remove the REGISTRY_HOOKS layer from the reghook cache.
There is no need to save the keyname again, we only need to
get the REGISTRY_OPS out of the pathtree.
Furthermore, this makes life easier, since we can now pass
in keynames as temporarily allocated strings.
Michael
(This used to be commit 2f9ee2f782c77ed99669af5ac2ba40cb0978f0da)
Diffstat (limited to 'source3/registry/reg_api.c')
-rw-r--r-- | source3/registry/reg_api.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source3/registry/reg_api.c b/source3/registry/reg_api.c index 1a0bf2b16a..cbbc7dd0ef 100644 --- a/source3/registry/reg_api.c +++ b/source3/registry/reg_api.c @@ -183,9 +183,9 @@ static WERROR regkey_open_onelevel(TALLOC_CTX *mem_ctx, /* Look up the table of registry I/O operations */ - if ( !(key->hook = reghook_cache_find( key->name )) ) { - DEBUG(0,("reg_open_onelevel: Failed to assign a " - "REGISTRY_HOOK to [%s]\n", key->name )); + if ( !(key->ops = reghook_cache_find( key->name )) ) { + DEBUG(0,("reg_open_onelevel: Failed to assign " + "REGISTRY_OPS to [%s]\n", key->name )); result = WERR_BADFILE; goto done; } @@ -733,9 +733,9 @@ static WERROR reg_load_tree(REGF_FILE *regfile, const char *topkeypath, /* initialize the REGISTRY_KEY structure */ - registry_key.hook = reghook_cache_find(topkeypath); - if (!registry_key.hook) { - DEBUG(0, ("reg_load_tree: Failed to assigned a REGISTRY_HOOK " + registry_key.ops = reghook_cache_find(topkeypath); + if (!registry_key.ops) { + DEBUG(0, ("reg_load_tree: Failed to assign REGISTRY_OPS " "to [%s]\n", topkeypath)); return WERR_BADFILE; } @@ -898,8 +898,8 @@ static WERROR reg_write_tree(REGF_FILE *regfile, const char *keypath, return WERR_NOMEM; } - registry_key.hook = reghook_cache_find(registry_key.name); - if (registry_key.hook == NULL) { + registry_key.ops = reghook_cache_find(registry_key.name); + if (registry_key.ops == NULL) { return WERR_BADFILE; } |