diff options
Diffstat (limited to 'plugins/check_smtp.c')
-rw-r--r-- | plugins/check_smtp.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c index a1c5f7ef..6e0e22ed 100644 --- a/plugins/check_smtp.c +++ b/plugins/check_smtp.c @@ -59,10 +59,6 @@ enum { #define SMTP_STARTTLS "STARTTLS\r\n" #define SMTP_AUTH_LOGIN "AUTH LOGIN\r\n" -#ifndef HOST_MAX_BYTES -#define HOST_MAX_BYTES 255 -#endif - #define EHLO_SUPPORTS_STARTTLS 1 int process_arguments (int, char **); @@ -228,8 +224,8 @@ main (int argc, char **argv) result = np_net_ssl_init(sd); if(result != STATE_OK) { printf (_("CRITICAL - Cannot create SSL context.\n")); - np_net_ssl_cleanup(); close(sd); + np_net_ssl_cleanup(); return STATE_CRITICAL; } else { ssl_established = 1; @@ -771,10 +767,12 @@ recvlines(char *buf, size_t bufsize) int my_close (void) { + int result; + result = close(sd); #ifdef HAVE_SSL - np_net_ssl_cleanup(); + np_net_ssl_cleanup(); #endif - return close(sd); + return result; } |