commit 5c055e09858a257d50f2669016da01b808557b08
Author: Andrew Beekhof <andrew@beekhof.net>
Date: Wed Aug 7 13:32:18 2013 +1000
Fix: cib: Correctly log short-form xml diffs
diff --git a/lib/common/xml.c b/lib/common/xml.c
index d467ce4..25096a6 100644
--- a/lib/common/xml.c
+++ b/lib/common/xml.c
@@ -1063,14 +1063,6 @@ log_data_element(int log_level, const char *file, const char *function, int line
do_crm_log_alias(log_level, file, function, line, "%s: %s", prefix,
"No data to dump as XML");
return;
-
- } else if (is_set(options, xml_log_option_diff_short)
- && is_not_set(options, xml_log_option_diff_all)) {
- /* Still searching for the actual change */
- for (a_child = __xml_first_child(data); a_child != NULL; a_child = __xml_next(a_child)) {
- log_data_element(log_level, file, function, line, prefix, a_child, depth + 1, options);
- }
- return;
}
name = crm_element_name(data);
@@ -1092,6 +1084,15 @@ log_data_element(int log_level, const char *file, const char *function, int line
}
}
+ if (is_set(options, xml_log_option_diff_short)
+ && is_not_set(options, xml_log_option_diff_all)) {
+ /* Still searching for the actual change */
+ for (a_child = __xml_first_child(data); a_child != NULL; a_child = __xml_next(a_child)) {
+ log_data_element(log_level, file, function, line, prefix, a_child, depth + 1, options);
+ }
+ return;
+ }
+
insert_prefix(options, &buffer, &offset, &max, depth);
if(data->type == XML_COMMENT_NODE) {
buffer_print(buffer, max, offset, "<!--");