MCPcopy Create free account
hub / github.com/ClusterLabs/pacemaker / get_failcount_by_prefix

Function get_failcount_by_prefix

lib/pengine/utils.c:1314–1330  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1312};
1313
1314static void
1315get_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
1332int
1333get_failcount(node_t * node, resource_t * rsc, int *last_failure, pe_working_set_t * data_set)

Callers

nothing calls this directly

Calls 2

crm_int_helperFunction · 0.85
char2scoreFunction · 0.85

Tested by

no test coverage detected