| 332 | } |
| 333 | |
| 334 | static void |
| 335 | attrd_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 |
nothing calls this directly
no test coverage detected