| 621 | } |
| 622 | |
| 623 | void |
| 624 | common_update_score(resource_t * rsc, const char *id, int score) |
| 625 | { |
| 626 | node_t *node = NULL; |
| 627 | |
| 628 | node = pe_hash_table_lookup(rsc->allowed_nodes, id); |
| 629 | if (node != NULL) { |
| 630 | pe_rsc_trace(rsc, "Updating score for %s on %s: %d + %d", rsc->id, id, node->weight, score); |
| 631 | node->weight = merge_weights(node->weight, score); |
| 632 | } |
| 633 | |
| 634 | if (rsc->children) { |
| 635 | GListPtr gIter = rsc->children; |
| 636 | |
| 637 | for (; gIter != NULL; gIter = gIter->next) { |
| 638 | resource_t *child_rsc = (resource_t *) gIter->data; |
| 639 | |
| 640 | common_update_score(child_rsc, id, score); |
| 641 | } |
| 642 | } |
| 643 | } |
| 644 | |
| 645 | resource_t * |
| 646 | uber_parent(resource_t * rsc) |
no test coverage detected