summaryrefslogtreecommitdiffstats
path: root/plugins/check_smtp.c
diff options
context:
space:
mode:
authorKarl DeBisschop <kdebisschop@users.sourceforge.net>2003-08-09 13:36:49 (GMT)
committerKarl DeBisschop <kdebisschop@users.sourceforge.net>2003-08-09 13:36:49 (GMT)
commit90b45deb4138efb47efbdd98a4aede1aebb47146 (patch)
treed27a0180ce89542ee546a0b1e958b68a114ea7ce /plugins/check_smtp.c
parent4784cac1f017a67978c2f3f2af75b161d1ef33c0 (diff)
downloadmonitoring-plugins-90b45deb4138efb47efbdd98a4aede1aebb47146.tar.gz
more pedantic compiler warnings
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@674 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_smtp.c')
-rw-r--r--plugins/check_smtp.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c
index f7c826b..c4e427a 100644
--- a/plugins/check_smtp.c
+++ b/plugins/check_smtp.c
@@ -41,8 +41,8 @@ int server_port = SMTP_PORT;
41char *server_address = NULL; 41char *server_address = NULL;
42char *server_expect = NULL; 42char *server_expect = NULL;
43int smtp_use_dummycmd = 1; 43int smtp_use_dummycmd = 1;
44char *mail_command = "MAIL "; 44char *mail_command;
45char *from_arg = " "; 45char *from_arg;
46int warning_time = 0; 46int warning_time = 0;
47int check_warning_time = FALSE; 47int check_warning_time = FALSE;
48int critical_time = 0; 48int 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}