[Nagiosplug-checkins] nagiosplug/plugins check_smtp.c,1.57,1.58
Ton Voon
tonvoon at users.sourceforge.net
Tue Mar 6 23:17:06 CET 2007
Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv30609/plugins
Modified Files:
check_smtp.c
Log Message:
Fixed broken HELO cmd (Enrico Scholz - 1675279)
Index: check_smtp.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_smtp.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- check_smtp.c 6 Feb 2007 21:03:21 -0000 1.57
+++ check_smtp.c 6 Mar 2007 22:17:04 -0000 1.58
@@ -179,7 +179,7 @@
if (process_arguments (argc, argv) == ERROR)
usage4 (_("Could not parse arguments"));
- /* initialize the HELO command with the localhostname */
+ /* If localhostname not set on command line, use gethostname to set */
if(! localhostname){
localhostname = malloc (HOST_MAX_BYTES);
if(!localhostname){
@@ -190,13 +190,11 @@
printf(_("gethostname() failed!\n"));
return STATE_CRITICAL;
}
- } else {
- helocmd = localhostname;
}
if(use_ehlo)
- asprintf (&helocmd, "%s%s%s", SMTP_EHLO, helocmd, "\r\n");
+ asprintf (&helocmd, "%s%s%s", SMTP_EHLO, localhostname, "\r\n");
else
- asprintf (&helocmd, "%s%s%s", SMTP_HELO, helocmd, "\r\n");
+ asprintf (&helocmd, "%s%s%s", SMTP_HELO, localhostname, "\r\n");
if (verbose)
printf("HELOCMD: %s", helocmd);
More information about the Commits
mailing list