MCPcopy Create free account
hub / github.com/ClusterLabs/pacemaker / attrd_ha_callback

Function attrd_ha_callback

tools/attrd.c:334–355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

332}
333
334static void
335attrd_ha_callback(HA_Message * msg, void *private_data)
336{
337 attr_hash_entry_t *hash_entry = NULL;
338 xmlNode *xml = convert_ha_message(NULL, msg, __FUNCTION__);
339 const char *from = crm_element_value(xml, F_ORIG);
340 const char *op = crm_element_value(xml, F_ATTRD_TASK);
341 const char *host = crm_element_value(xml, F_ATTRD_HOST);
342 const char *ignore = crm_element_value(xml, F_ATTRD_IGNORE_LOCALLY);
343
344 if (host != NULL && safe_str_eq(host, attrd_uname)) {
345 crm_info("Update relayed from %s", from);
346 attrd_local_callback(xml);
347
348 } else if (ignore == NULL || safe_str_neq(from, attrd_uname)) {
349 crm_info("%s message from %s", op, from);
350 hash_entry = find_hash_entry(xml);
351 stop_attrd_timer(hash_entry);
352 attrd_perform_update(hash_entry);
353 }
354 free_xml(xml);
355}
356
357#endif
358

Callers

nothing calls this directly

Calls 8

convert_ha_messageFunction · 0.85
crm_element_valueFunction · 0.85
attrd_local_callbackFunction · 0.85
safe_str_neqFunction · 0.85
find_hash_entryFunction · 0.85
stop_attrd_timerFunction · 0.85
attrd_perform_updateFunction · 0.85
free_xmlFunction · 0.85

Tested by

no test coverage detected