diff options
Diffstat (limited to 'plugins-root')
-rw-r--r-- | plugins-root/check_icmp.c | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/plugins-root/check_icmp.c b/plugins-root/check_icmp.c index bad73cc4..7f01e1b6 100644 --- a/plugins-root/check_icmp.c +++ b/plugins-root/check_icmp.c | |||
@@ -484,7 +484,7 @@ check_icmp_config_wrapper process_arguments(int argc, char **argv) { | |||
484 | result.config.need_v6 = true; | 484 | result.config.need_v6 = true; |
485 | } | 485 | } |
486 | } else { | 486 | } else { |
487 | // TODO adding host failed, crash here | 487 | crash("Failed to add host, unable to parse it correctly"); |
488 | } | 488 | } |
489 | } break; | 489 | } break; |
490 | case 'l': | 490 | case 'l': |
@@ -848,19 +848,6 @@ int main(int argc, char **argv) { | |||
848 | mp_set_format(config.output_format); | 848 | mp_set_format(config.output_format); |
849 | } | 849 | } |
850 | 850 | ||
851 | // int icmp_proto = IPPROTO_ICMP; | ||
852 | // add_target might change address_family | ||
853 | // switch (address_family) { | ||
854 | // case AF_INET: | ||
855 | // icmp_proto = IPPROTO_ICMP; | ||
856 | // break; | ||
857 | // case AF_INET6: | ||
858 | // icmp_proto = IPPROTO_ICMPV6; | ||
859 | // break; | ||
860 | // default: | ||
861 | // crash("Address family not supported"); | ||
862 | // } | ||
863 | |||
864 | check_icmp_socket_set sockset = { | 851 | check_icmp_socket_set sockset = { |
865 | .socket4 = -1, | 852 | .socket4 = -1, |
866 | .socket6 = -1, | 853 | .socket6 = -1, |
@@ -1556,14 +1543,6 @@ static void finish(int sig, check_icmp_mode_switches modes, int min_hosts_alive, | |||
1556 | mp_add_subcheck_to_check(overall, host_check.sc_host); | 1543 | mp_add_subcheck_to_check(overall, host_check.sc_host); |
1557 | } | 1544 | } |
1558 | 1545 | ||
1559 | /* this is inevitable */ | ||
1560 | // if (targets_alive(number_of_targets, program_state->targets_down) == 0) { | ||
1561 | // mp_subcheck sc_no_target_alive = mp_subcheck_init(); | ||
1562 | // sc_no_target_alive = mp_set_subcheck_state(sc_no_target_alive, STATE_CRITICAL); | ||
1563 | // sc_no_target_alive.output = strdup("No target is alive!"); | ||
1564 | // mp_add_subcheck_to_check(overall, sc_no_target_alive); | ||
1565 | // } | ||
1566 | |||
1567 | if (min_hosts_alive > -1) { | 1546 | if (min_hosts_alive > -1) { |
1568 | mp_subcheck sc_min_targets_alive = mp_subcheck_init(); | 1547 | mp_subcheck sc_min_targets_alive = mp_subcheck_init(); |
1569 | sc_min_targets_alive = mp_set_subcheck_default_state(sc_min_targets_alive, STATE_OK); | 1548 | sc_min_targets_alive = mp_set_subcheck_default_state(sc_min_targets_alive, STATE_OK); |