summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2009-02-25 22:06:47 +0100
committerMichael Adam <obnox@samba.org>2009-02-26 13:22:55 +0100
commit4b444e4ac4ca0a00a01f22f04bcf01e78593c3a9 (patch)
tree99bf375e989032f84f78ec2a20134ef3d95ec85c /source3
parentd73dafb5fe4339611e3e61f5622a6f8c4b81b1c1 (diff)
downloadsamba-4b444e4ac4ca0a00a01f22f04bcf01e78593c3a9.tar.gz
samba-4b444e4ac4ca0a00a01f22f04bcf01e78593c3a9.tar.bz2
samba-4b444e4ac4ca0a00a01f22f04bcf01e78593c3a9.zip
s3:registry: use create_reg_subkey() in reg_createkey().
Instead of calling store_reg_keys() On my box, importing 2000 shares into an empty smbconf key now takes some 32 seconds. Michael
Diffstat (limited to 'source3')
-rw-r--r--source3/registry/reg_api.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/source3/registry/reg_api.c b/source3/registry/reg_api.c
index 7185b1a312..9f6ed20568 100644
--- a/source3/registry/reg_api.c
+++ b/source3/registry/reg_api.c
@@ -524,14 +524,8 @@ WERROR reg_createkey(TALLOC_CTX *ctx, struct registry_key *parent,
err = fill_subkey_cache(create_parent);
if (!W_ERROR_IS_OK(err)) goto done;
- err = regsubkey_ctr_addkey(create_parent->subkeys, path);
- if (!W_ERROR_IS_OK(err)) goto done;
-
- if (!store_reg_keys(create_parent->key, create_parent->subkeys)) {
- TALLOC_FREE(create_parent->subkeys);
- err = WERR_REG_IO_FAILURE;
- goto done;
- }
+ err = create_reg_subkey(key->key, path);
+ W_ERROR_NOT_OK_GOTO_DONE(err);
/*
* Now open the newly created key