diff options
author | Chris Davis <cd.rattan@gmail.com> | 2014-06-27 18:01:36 -0700 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2014-10-01 14:32:08 +0200 |
commit | 75045f052a5bc00fc8ffe35514c60e2f1611c9e9 (patch) | |
tree | 4fae0d2fb6c16cb47066b4907311f3d88488dae2 /source3/utils/regedit_treeview.c | |
parent | 2a8beb99a49829adfbad1c887448e3a2caa32255 (diff) | |
download | samba-75045f052a5bc00fc8ffe35514c60e2f1611c9e9.tar.gz |
regedit: reopen parent keys when adding or removing subkeys
This clears any cache associated with the parent key,
and ensures the changes will be noticed by the UI.
Signed-off-by: Chris Davis <cd.rattan@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3/utils/regedit_treeview.c')
-rw-r--r-- | source3/utils/regedit_treeview.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/utils/regedit_treeview.c b/source3/utils/regedit_treeview.c index c8a65965bcb..3af3c8b59ce 100644 --- a/source3/utils/regedit_treeview.c +++ b/source3/utils/regedit_treeview.c @@ -141,6 +141,15 @@ static uint32_t get_num_subkeys(struct tree_node *node) return 0; } +WERROR tree_node_reopen_key(struct tree_node *node) +{ + SMB_ASSERT(node->parent != NULL); + SMB_ASSERT(node->name != NULL); + TALLOC_FREE(node->key); + return reg_open_key(node->parent, node->parent->key, node->name, + &node->key); +} + bool tree_node_has_children(struct tree_node *node) { if (node->child_head) { |