summaryrefslogtreecommitdiff
path: root/source3/utils/regedit_treeview.c
diff options
context:
space:
mode:
authorChris Davis <cd.rattan@gmail.com>2014-06-27 18:01:36 -0700
committerMichael Adam <obnox@samba.org>2014-10-01 14:32:08 +0200
commit75045f052a5bc00fc8ffe35514c60e2f1611c9e9 (patch)
tree4fae0d2fb6c16cb47066b4907311f3d88488dae2 /source3/utils/regedit_treeview.c
parent2a8beb99a49829adfbad1c887448e3a2caa32255 (diff)
downloadsamba-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.c9
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) {