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) char *helocmd = NULL; char *error_msg = NULL; struct timeval tv; - struct hostent *hp; setlocale (LC_ALL, ""); bindtextdomain (PACKAGE, LOCALEDIR); @@ -191,9 +190,6 @@ main (int argc, char **argv) printf(_("gethostname() failed!\n")); return STATE_CRITICAL; } - hp = gethostbyname(localhostname); - if(!hp) helocmd = localhostname; - else helocmd = hp->h_name; } else { helocmd = localhostname; } @@ -202,6 +198,9 @@ main (int argc, char **argv) else asprintf (&helocmd, "%s%s%s", SMTP_HELO, helocmd, "\r\n"); + if (verbose) + printf("HELOCMD: %s", helocmd); + /* initialize the MAIL command with optional FROM command */ asprintf (&cmd_str, "%sFROM: %s%s", mail_command, from_arg, "\r\n"); |