summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2010-03-22 11:45:20 +0100
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2010-03-22 12:26:29 +0100
commit5f24bfb7b9419d4aac220adc038bd3776fc172e6 (patch)
treeb8542d79dabb807c225a506a25ef1e077f6f7fd2 /source4
parentb2f45f20b0108ba6c834f813386ab3d29a729abd (diff)
downloadsamba-5f24bfb7b9419d4aac220adc038bd3776fc172e6.tar.gz
samba-5f24bfb7b9419d4aac220adc038bd3776fc172e6.tar.bz2
samba-5f24bfb7b9419d4aac220adc038bd3776fc172e6.zip
s4:registry - "patchfile" - add comments
Helps to understand when we need to generate the hive diffs.
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/registry/patchfile.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/lib/registry/patchfile.c b/source4/lib/registry/patchfile.c
index 6b08cf8948..0da722bb6d 100644
--- a/source4/lib/registry/patchfile.c
+++ b/source4/lib/registry/patchfile.c
@@ -280,10 +280,16 @@ _PUBLIC_ WERROR reg_generate_diff(struct registry_context *ctx1,
continue;
}
+ /* if "r1" is NULL (old hive) and "r2" isn't (new hive) then
+ * the hive doesn't exist yet and we have to generate an add
+ * diff */
if ((r1 == NULL) && (r2 != NULL)) {
callbacks->add_key(callback_data,
reg_predefined_keys[i].name);
}
+ /* if "r1" isn't NULL (old hive) and "r2" is (new hive) then
+ * the hive shouldn't exist anymore and we have to generate a
+ * del diff */
if ((r1 != NULL) && (r2 == NULL)) {
callbacks->del_key(callback_data,
reg_predefined_keys[i].name);