| 913 | } |
| 914 | |
| 915 | static void |
| 916 | node_hash_update_one(GHashTable * hash, node_t * other, const char *attr, int score) |
| 917 | { |
| 918 | GHashTableIter iter; |
| 919 | node_t *node = NULL; |
| 920 | const char *value = NULL; |
| 921 | |
| 922 | if (other == NULL) { |
| 923 | return; |
| 924 | |
| 925 | } else if (attr == NULL) { |
| 926 | attr = "#" XML_ATTR_UNAME; |
| 927 | } |
| 928 | |
| 929 | value = g_hash_table_lookup(other->details->attrs, attr); |
| 930 | g_hash_table_iter_init(&iter, hash); |
| 931 | while (g_hash_table_iter_next(&iter, NULL, (void **)&node)) { |
| 932 | const char *tmp = g_hash_table_lookup(node->details->attrs, attr); |
| 933 | |
| 934 | if (safe_str_eq(value, tmp)) { |
| 935 | crm_trace("%s: %d + %d", node->details->uname, node->weight, other->weight); |
| 936 | node->weight = merge_weights(node->weight, score); |
| 937 | } |
| 938 | } |
| 939 | } |
| 940 | |
| 941 | void |
| 942 | master_rsc_colocation_rh(resource_t * rsc_lh, resource_t * rsc_rh, rsc_colocation_t * constraint) |
no test coverage detected