Blame SOURCES/pacemaker-fix_cib_correctly_log_short-form_xml_diffs.patch

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