diff options
Diffstat (limited to 'plugins-root/check_icmp.d')
-rw-r--r-- | plugins-root/check_icmp.d/check_icmp_helpers.c | 19 | ||||
-rw-r--r-- | plugins-root/check_icmp.d/check_icmp_helpers.h | 2 |
2 files changed, 0 insertions, 21 deletions
diff --git a/plugins-root/check_icmp.d/check_icmp_helpers.c b/plugins-root/check_icmp.d/check_icmp_helpers.c index 7a936cc9..ec786305 100644 --- a/plugins-root/check_icmp.d/check_icmp_helpers.c +++ b/plugins-root/check_icmp.d/check_icmp_helpers.c | |||
@@ -132,22 +132,3 @@ unsigned int ping_target_list_append(ping_target *list, ping_target *elem) { | |||
132 | 132 | ||
133 | return result; | 133 | return result; |
134 | } | 134 | } |
135 | |||
136 | void check_icmp_timeout_handler(int signal, siginfo_t *info, void *ucontext) { | ||
137 | // Ignore unused arguments | ||
138 | (void)info; | ||
139 | (void)ucontext; | ||
140 | mp_subcheck timeout_sc = mp_subcheck_init(); | ||
141 | timeout_sc = mp_set_subcheck_state(timeout_sc, socket_timeout_state); | ||
142 | |||
143 | if (signal == SIGALRM) { | ||
144 | xasprintf(&timeout_sc.output, _("timeout after %d seconds\n"), timeout); | ||
145 | } else { | ||
146 | xasprintf(&timeout_sc.output, _("timeout after %d seconds\n"), timeout); | ||
147 | } | ||
148 | |||
149 | mp_check overall = mp_check_init(); | ||
150 | mp_add_subcheck_to_check(&overall, timeout_sc); | ||
151 | |||
152 | mp_exit(overall); | ||
153 | } | ||
diff --git a/plugins-root/check_icmp.d/check_icmp_helpers.h b/plugins-root/check_icmp.d/check_icmp_helpers.h index 1b9372ce..dc6ea40b 100644 --- a/plugins-root/check_icmp.d/check_icmp_helpers.h +++ b/plugins-root/check_icmp.d/check_icmp_helpers.h | |||
@@ -66,5 +66,3 @@ typedef struct { | |||
66 | 66 | ||
67 | ping_target_create_wrapper ping_target_create(struct sockaddr_storage address); | 67 | ping_target_create_wrapper ping_target_create(struct sockaddr_storage address); |
68 | unsigned int ping_target_list_append(ping_target *list, ping_target *elem); | 68 | unsigned int ping_target_list_append(ping_target *list, ping_target *elem); |
69 | |||
70 | void check_icmp_timeout_handler(int, siginfo_t *, void *); | ||