diff options
Diffstat (limited to 'plugins/check_smtp.c')
-rw-r--r-- | plugins/check_smtp.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c index f7c826b2..c4e427a6 100644 --- a/plugins/check_smtp.c +++ b/plugins/check_smtp.c | |||
@@ -41,8 +41,8 @@ int server_port = SMTP_PORT; | |||
41 | char *server_address = NULL; | 41 | char *server_address = NULL; |
42 | char *server_expect = NULL; | 42 | char *server_expect = NULL; |
43 | int smtp_use_dummycmd = 1; | 43 | int smtp_use_dummycmd = 1; |
44 | char *mail_command = "MAIL "; | 44 | char *mail_command; |
45 | char *from_arg = " "; | 45 | char *from_arg; |
46 | int warning_time = 0; | 46 | int warning_time = 0; |
47 | int check_warning_time = FALSE; | 47 | int check_warning_time = FALSE; |
48 | int critical_time = 0; | 48 | int critical_time = 0; |
@@ -60,7 +60,7 @@ main (int argc, char **argv) | |||
60 | int sd; | 60 | int sd; |
61 | double elapsed_time; | 61 | double elapsed_time; |
62 | int result = STATE_UNKNOWN; | 62 | int result = STATE_UNKNOWN; |
63 | char buffer[MAX_INPUT_BUFFER] = ""; | 63 | char buffer[MAX_INPUT_BUFFER]; |
64 | char *from_str = NULL; | 64 | char *from_str = NULL; |
65 | char *helocmd = NULL; | 65 | char *helocmd = NULL; |
66 | struct timeval tv; | 66 | struct timeval tv; |
@@ -313,7 +313,13 @@ process_arguments (int argc, char **argv) | |||
313 | } | 313 | } |
314 | 314 | ||
315 | if (server_expect == NULL) | 315 | if (server_expect == NULL) |
316 | asprintf (&server_expect, SMTP_EXPECT); | 316 | server_expect = strdup (SMTP_EXPECT); |
317 | |||
318 | if (mail_command == NULL) | ||
319 | mail_command = strdup("MAIL "); | ||
320 | |||
321 | if (from_arg==NULL) | ||
322 | from_arg = strdup(" "); | ||
317 | 323 | ||
318 | return validate_arguments (); | 324 | return validate_arguments (); |
319 | } | 325 | } |