| 550 | } |
| 551 | |
| 552 | static void |
| 553 | forward_request(xmlNode * request, cib_client_t * cib_client, int call_options) |
| 554 | { |
| 555 | const char *op = crm_element_value(request, F_CIB_OPERATION); |
| 556 | const char *host = crm_element_value(request, F_CIB_HOST); |
| 557 | |
| 558 | crm_xml_add(request, F_CIB_DELEGATED, cib_our_uname); |
| 559 | |
| 560 | if (host != NULL) { |
| 561 | crm_trace("Forwarding %s op to %s", op, host); |
| 562 | send_cluster_message(crm_get_peer(0, host), crm_msg_cib, request, FALSE); |
| 563 | |
| 564 | } else { |
| 565 | crm_trace("Forwarding %s op to master instance", op); |
| 566 | send_cluster_message(NULL, crm_msg_cib, request, FALSE); |
| 567 | } |
| 568 | |
| 569 | /* Return the request to its original state */ |
| 570 | xml_remove_prop(request, F_CIB_DELEGATED); |
| 571 | |
| 572 | if (call_options & cib_discard_reply) { |
| 573 | crm_trace("Client not interested in reply"); |
| 574 | } |
| 575 | } |
| 576 | |
| 577 | static gboolean |
| 578 | send_peer_reply(xmlNode * msg, xmlNode * result_diff, const char *originator, gboolean broadcast) |
no test coverage detected