| 1000 | } |
| 1001 | |
| 1002 | static void force_gather_notify_fn( |
| 1003 | int32_t event, |
| 1004 | const char *key_name, |
| 1005 | struct icmap_notify_value new_val, |
| 1006 | struct icmap_notify_value old_val, |
| 1007 | void *user_data) |
| 1008 | { |
| 1009 | char *key_val; |
| 1010 | |
| 1011 | if (icmap_get_string(key_name, &key_val) == CS_OK && strcmp(key_val, "no") == 0) |
| 1012 | goto out; |
| 1013 | |
| 1014 | icmap_set_string("runtime.force_gather", "no"); |
| 1015 | |
| 1016 | if (strcmp(key_name, "runtime.force_gather") == 0) { |
| 1017 | log_printf(LOGSYS_LEVEL_ERROR, "Forcing into GATHER state\n"); |
| 1018 | totempg_force_gather(); |
| 1019 | } |
| 1020 | |
| 1021 | out: |
| 1022 | free(key_val); |
| 1023 | } |
| 1024 | |
| 1025 | static void corosync_force_gather_init (void) |
| 1026 | { |
nothing calls this directly
no test coverage detected