diff options
| author | Ton Voon <tonvoon@users.sourceforge.net> | 2007-01-24 22:47:25 +0000 |
|---|---|---|
| committer | Ton Voon <tonvoon@users.sourceforge.net> | 2007-01-24 22:47:25 +0000 |
| commit | fe856aa957978504137c1d425815d4ed8a22be40 (patch) | |
| tree | a5bb46ce0e64b2056f75700eadbf27aba7c39418 /plugins/check_smtp.c | |
| parent | 210f39bc84cfbb21cd72dc054e43f13815ee0616 (diff) | |
| download | monitoring-plugins-fe856aa957978504137c1d425815d4ed8a22be40.tar.gz | |
Sync with gnulib - lots of extraneous code removed in preference to GNU code
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1580 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_smtp.c')
| -rw-r--r-- | plugins/check_smtp.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c index ee6d0cb7..94214ee0 100644 --- a/plugins/check_smtp.c +++ b/plugins/check_smtp.c | |||
| @@ -171,7 +171,6 @@ main (int argc, char **argv) | |||
| 171 | char *helocmd = NULL; | 171 | char *helocmd = NULL; |
| 172 | char *error_msg = NULL; | 172 | char *error_msg = NULL; |
| 173 | struct timeval tv; | 173 | struct timeval tv; |
| 174 | struct hostent *hp; | ||
| 175 | 174 | ||
| 176 | setlocale (LC_ALL, ""); | 175 | setlocale (LC_ALL, ""); |
| 177 | bindtextdomain (PACKAGE, LOCALEDIR); | 176 | bindtextdomain (PACKAGE, LOCALEDIR); |
| @@ -191,9 +190,6 @@ main (int argc, char **argv) | |||
| 191 | printf(_("gethostname() failed!\n")); | 190 | printf(_("gethostname() failed!\n")); |
| 192 | return STATE_CRITICAL; | 191 | return STATE_CRITICAL; |
| 193 | } | 192 | } |
| 194 | hp = gethostbyname(localhostname); | ||
| 195 | if(!hp) helocmd = localhostname; | ||
| 196 | else helocmd = hp->h_name; | ||
| 197 | } else { | 193 | } else { |
| 198 | helocmd = localhostname; | 194 | helocmd = localhostname; |
| 199 | } | 195 | } |
| @@ -202,6 +198,9 @@ main (int argc, char **argv) | |||
| 202 | else | 198 | else |
| 203 | asprintf (&helocmd, "%s%s%s", SMTP_HELO, helocmd, "\r\n"); | 199 | asprintf (&helocmd, "%s%s%s", SMTP_HELO, helocmd, "\r\n"); |
| 204 | 200 | ||
| 201 | if (verbose) | ||
| 202 | printf("HELOCMD: %s", helocmd); | ||
| 203 | |||
| 205 | /* initialize the MAIL command with optional FROM command */ | 204 | /* initialize the MAIL command with optional FROM command */ |
| 206 | asprintf (&cmd_str, "%sFROM: %s%s", mail_command, from_arg, "\r\n"); | 205 | asprintf (&cmd_str, "%sFROM: %s%s", mail_command, from_arg, "\r\n"); |
| 207 | 206 | ||
