| 1312 | }; |
| 1313 | |
| 1314 | static void |
| 1315 | get_failcount_by_prefix(gpointer key_p, gpointer value, gpointer user_data) |
| 1316 | { |
| 1317 | struct fail_search *search = user_data; |
| 1318 | const char *key = key_p; |
| 1319 | |
| 1320 | const char *match = strstr(key, search->key); |
| 1321 | |
| 1322 | if (match) { |
| 1323 | if (strstr(key, "last-failure-") == key && (key + 13) == match) { |
| 1324 | search->last = crm_int_helper(value, NULL); |
| 1325 | |
| 1326 | } else if (strstr(key, "fail-count-") == key && (key + 11) == match) { |
| 1327 | search->count += char2score(value); |
| 1328 | } |
| 1329 | } |
| 1330 | } |
| 1331 | |
| 1332 | int |
| 1333 | get_failcount(node_t * node, resource_t * rsc, int *last_failure, pe_working_set_t * data_set) |
nothing calls this directly
no test coverage detected