diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2016-11-18 10:51:12 (GMT) |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2016-11-18 10:51:12 (GMT) |
commit | 303acfc64f2f656729bde803a410a10a80a76b40 (patch) | |
tree | 9bcc6015490531921ad5794ac55382a3a0aa96ee /plugins/check_smtp.c | |
parent | 1723a3c7610cc43438c51d1e5fed43e15099a60e (diff) | |
parent | fe1c4bb0e5ea3632d608a6b8b7e51d580856d833 (diff) | |
download | monitoring-plugins-303acfc64f2f656729bde803a410a10a80a76b40.tar.gz |
Merge remote-tracking branch 'monitoring-plugins/pr/1443'
* monitoring-plugins/pr/1443:
add openssl 1.1 support
Diffstat (limited to 'plugins/check_smtp.c')
-rw-r--r-- | plugins/check_smtp.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c index 05e81f2..587a724 100644 --- a/plugins/check_smtp.c +++ b/plugins/check_smtp.c | |||
@@ -235,8 +235,8 @@ main (int argc, char **argv) | |||
235 | result = np_net_ssl_init(sd); | 235 | result = np_net_ssl_init(sd); |
236 | if(result != STATE_OK) { | 236 | if(result != STATE_OK) { |
237 | printf (_("CRITICAL - Cannot create SSL context.\n")); | 237 | printf (_("CRITICAL - Cannot create SSL context.\n")); |
238 | np_net_ssl_cleanup(); | ||
239 | close(sd); | 238 | close(sd); |
239 | np_net_ssl_cleanup(); | ||
240 | return STATE_CRITICAL; | 240 | return STATE_CRITICAL; |
241 | } else { | 241 | } else { |
242 | ssl_established = 1; | 242 | ssl_established = 1; |
@@ -760,10 +760,12 @@ recvlines(char *buf, size_t bufsize) | |||
760 | int | 760 | int |
761 | my_close (void) | 761 | my_close (void) |
762 | { | 762 | { |
763 | int result; | ||
764 | result = close(sd); | ||
763 | #ifdef HAVE_SSL | 765 | #ifdef HAVE_SSL |
764 | np_net_ssl_cleanup(); | 766 | np_net_ssl_cleanup(); |
765 | #endif | 767 | #endif |
766 | return close(sd); | 768 | return result; |
767 | } | 769 | } |
768 | 770 | ||
769 | 771 | ||