diff options
author | Ton Voon <ton.voon@opsera.com> | 2011-07-15 21:19:15 +0100 |
---|---|---|
committer | Ton Voon <ton.voon@opsera.com> | 2011-07-15 21:19:15 +0100 |
commit | 4d06603060fc1233861b164870f0d3a2e0d8d2eb (patch) | |
tree | 5fadde27f34daa4bb3641b8207af08f3f7fed483 /plugins/check_tcp.c | |
parent | e7f6da0211d1ee86f76ad5c3a36c6d58d53b1091 (diff) | |
download | monitoring-plugins-4d06603060fc1233861b164870f0d3a2e0d8d2eb.tar.gz |
Fix check_smtp and check_tcp where duplicate messages were displayed for certificate errors (Opsview team)
Diffstat (limited to 'plugins/check_tcp.c')
-rw-r--r-- | plugins/check_tcp.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c index 178bd568..d3c92a49 100644 --- a/plugins/check_tcp.c +++ b/plugins/check_tcp.c | |||
@@ -236,12 +236,9 @@ main (int argc, char **argv) | |||
236 | result = np_net_ssl_init(sd); | 236 | result = np_net_ssl_init(sd); |
237 | if (result == STATE_OK && check_cert == TRUE) { | 237 | if (result == STATE_OK && check_cert == TRUE) { |
238 | result = np_net_ssl_check_cert(days_till_exp); | 238 | result = np_net_ssl_check_cert(days_till_exp); |
239 | if(result != STATE_OK) { | ||
240 | printf(_("CRITICAL - Cannot retrieve server certificate.\n")); | ||
241 | } | ||
242 | } | 239 | } |
243 | } | 240 | } |
244 | if(result != STATE_OK){ | 241 | if(result != STATE_OK || check_cert == TRUE){ |
245 | np_net_ssl_cleanup(); | 242 | np_net_ssl_cleanup(); |
246 | if(sd) close(sd); | 243 | if(sd) close(sd); |
247 | return result; | 244 | return result; |