diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2007-03-06 22:17:04 +0000 |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2007-03-06 22:17:04 +0000 |
commit | 1db33136b0e4176848e202281b4a054a7ed71533 (patch) | |
tree | cd36d9d3c114d31a7ac7bb206e5212d51f2fb1df /plugins | |
parent | 4ad5dcce03df2e0167c8aae6f9f5debfe173f5a4 (diff) | |
download | monitoring-plugins-1db33136b0e4176848e202281b4a054a7ed71533.tar.gz |
Fixed broken HELO cmd (Enrico Scholz - 1675279)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1630 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/check_smtp.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c index a7ba45a1..6987e172 100644 --- a/plugins/check_smtp.c +++ b/plugins/check_smtp.c | |||
@@ -179,7 +179,7 @@ main (int argc, char **argv) | |||
179 | if (process_arguments (argc, argv) == ERROR) | 179 | if (process_arguments (argc, argv) == ERROR) |
180 | usage4 (_("Could not parse arguments")); | 180 | usage4 (_("Could not parse arguments")); |
181 | 181 | ||
182 | /* initialize the HELO command with the localhostname */ | 182 | /* If localhostname not set on command line, use gethostname to set */ |
183 | if(! localhostname){ | 183 | if(! localhostname){ |
184 | localhostname = malloc (HOST_MAX_BYTES); | 184 | localhostname = malloc (HOST_MAX_BYTES); |
185 | if(!localhostname){ | 185 | if(!localhostname){ |
@@ -190,13 +190,11 @@ main (int argc, char **argv) | |||
190 | printf(_("gethostname() failed!\n")); | 190 | printf(_("gethostname() failed!\n")); |
191 | return STATE_CRITICAL; | 191 | return STATE_CRITICAL; |
192 | } | 192 | } |
193 | } else { | ||
194 | helocmd = localhostname; | ||
195 | } | 193 | } |
196 | if(use_ehlo) | 194 | if(use_ehlo) |
197 | asprintf (&helocmd, "%s%s%s", SMTP_EHLO, helocmd, "\r\n"); | 195 | asprintf (&helocmd, "%s%s%s", SMTP_EHLO, localhostname, "\r\n"); |
198 | else | 196 | else |
199 | asprintf (&helocmd, "%s%s%s", SMTP_HELO, helocmd, "\r\n"); | 197 | asprintf (&helocmd, "%s%s%s", SMTP_HELO, localhostname, "\r\n"); |
200 | 198 | ||
201 | if (verbose) | 199 | if (verbose) |
202 | printf("HELOCMD: %s", helocmd); | 200 | printf("HELOCMD: %s", helocmd); |