15 #include <libxml/tree.h> 36 pcmk__assert((table != NULL) && (
id != NULL) && (referrer != NULL));
38 idref = g_hash_table_lookup(table,
id);
44 for (GList *iter = idref->
refs; iter != NULL; iter = iter->next) {
45 if (pcmk__str_eq(referrer, (
const char *) iter->data,
51 crm_trace(
"Added ID %s referrer %s",
id, referrer);
67 g_list_free_full(idref->
refs, free);
88 const char *ref = NULL;
100 if (search == NULL) {
110 "a valid object " QB_XS
" xpath=%s",
111 xml->name, ref, xpath);
xmlNode * pcmk__xe_resolve_idref(xmlNode *xml, xmlNode *search)
#define pcmk__config_err(fmt...)
xmlNode * get_xpath_object(const char *xpath, xmlNode *xml_obj, int error_level)
void pcmk__free_idref(gpointer data)
const char * crm_element_value(const xmlNode *data, const char *name)
Retrieve the value of an XML attribute.
#define crm_trace(fmt, args...)
Wrappers for and extensions to libxml2.
#define pcmk__str_copy(str)
void pcmk__add_idref(GHashTable *table, const char *id, const char *referrer)
#define pcmk__assert(expr)
pcmk__action_result_t result
#define pcmk__assert_alloc(nmemb, size)
char * crm_strdup_printf(char const *format,...) G_GNUC_PRINTF(1