| 425 | } |
| 426 | |
| 427 | static void |
| 428 | parse_local_options(cib_client_t * cib_client, int call_type, int call_options, const char *host, |
| 429 | const char *op, gboolean * local_notify, gboolean * needs_reply, |
| 430 | gboolean * process, gboolean * needs_forward) |
| 431 | { |
| 432 | if (cib_op_modifies(call_type) |
| 433 | && !(call_options & cib_inhibit_bcast)) { |
| 434 | /* we need to send an update anyway */ |
| 435 | *needs_reply = TRUE; |
| 436 | } else { |
| 437 | *needs_reply = FALSE; |
| 438 | } |
| 439 | |
| 440 | if (host == NULL && (call_options & cib_scope_local)) { |
| 441 | crm_trace("Processing locally scoped %s op from %s", op, cib_client->name); |
| 442 | *local_notify = TRUE; |
| 443 | |
| 444 | } else if (host == NULL && cib_is_master) { |
| 445 | crm_trace("Processing master %s op locally from %s", op, cib_client->name); |
| 446 | *local_notify = TRUE; |
| 447 | |
| 448 | } else if (safe_str_eq(host, cib_our_uname)) { |
| 449 | crm_trace("Processing locally addressed %s op from %s", op, cib_client->name); |
| 450 | *local_notify = TRUE; |
| 451 | |
| 452 | } else if (stand_alone) { |
| 453 | *needs_forward = FALSE; |
| 454 | *local_notify = TRUE; |
| 455 | *process = TRUE; |
| 456 | |
| 457 | } else { |
| 458 | crm_trace("%s op from %s needs to be forwarded to %s", |
| 459 | op, cib_client->name, host ? host : "the master instance"); |
| 460 | *needs_forward = TRUE; |
| 461 | *process = FALSE; |
| 462 | } |
| 463 | } |
| 464 | |
| 465 | static gboolean |
| 466 | parse_peer_options(int call_type, xmlNode * request, |
no test coverage detected