summaryrefslogtreecommitdiff
path: root/source3/registry/reg_init_smbconf.c
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-04-13 00:54:44 +0200
committerMichael Adam <obnox@samba.org>2008-04-13 01:43:42 +0200
commit413c2e9b0aed25ef49b4344c1aec145d0e45a51e (patch)
tree99fdbd0329245d4e73b5f3e3ae3981c8d0819e01 /source3/registry/reg_init_smbconf.c
parenta75421b0190763e5e482db215d8b1e6052bdcc19 (diff)
downloadsamba-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_init_smbconf.c')
-rw-r--r--source3/registry/reg_init_smbconf.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source3/registry/reg_init_smbconf.c b/source3/registry/reg_init_smbconf.c
index f76cc2f051..d1acd213c1 100644
--- a/source3/registry/reg_init_smbconf.c
+++ b/source3/registry/reg_init_smbconf.c
@@ -71,7 +71,6 @@ bool registry_init_smbconf(void)
{
bool ret = false;
int saved_errno = 0;
- static REGISTRY_HOOK smbconf_reg_hook = {KEY_SMBCONF, &smbconf_reg_ops};
DEBUG(10, ("registry_init_smbconf called\n"));
@@ -90,7 +89,7 @@ bool registry_init_smbconf(void)
goto done;
}
reghook_cache_init();
- if (!reghook_cache_add(&smbconf_reg_hook)) {
+ if (!reghook_cache_add(KEY_SMBCONF, &smbconf_reg_ops)) {
DEBUG(1, ("Error adding smbconf reghooks to reghook cache.\n"));
goto done;
}