| 50 | gboolean privileged); |
| 51 | |
| 52 | static xmlNode * |
| 53 | cib_prepare_common(xmlNode * root, const char *section) |
| 54 | { |
| 55 | xmlNode *data = NULL; |
| 56 | |
| 57 | /* extract the CIB from the fragment */ |
| 58 | if (root == NULL) { |
| 59 | return NULL; |
| 60 | |
| 61 | } else if (safe_str_eq(crm_element_name(root), XML_TAG_FRAGMENT) |
| 62 | || safe_str_eq(crm_element_name(root), F_CRM_DATA) |
| 63 | || safe_str_eq(crm_element_name(root), F_CIB_CALLDATA)) { |
| 64 | data = first_named_child(root, XML_TAG_CIB); |
| 65 | |
| 66 | } else { |
| 67 | data = root; |
| 68 | } |
| 69 | |
| 70 | /* grab the section specified for the command */ |
| 71 | if (section != NULL && data != NULL && crm_str_eq(crm_element_name(data), XML_TAG_CIB, TRUE)) { |
| 72 | data = get_object_root(section, data); |
| 73 | } |
| 74 | |
| 75 | /* crm_log_xml_trace(root, "cib:input"); */ |
| 76 | return data; |
| 77 | } |
| 78 | |
| 79 | static int |
| 80 | cib_prepare_none(xmlNode * request, xmlNode ** data, const char **section) |
no test coverage detected