From 3c2d2abb007c8d97c6a09d9be0e70367518afe30 Mon Sep 17 00:00:00 2001 From: markus schnalke Date: Wed, 14 Jan 2015 07:53:31 +0100 Subject: [PATCH] Remove verbosity for -noverbose; cleanup in code layout and message texts We shouldn't print information messages if we run non-verbosely. In this case, the message appeared not to be helpful because it suggests to re-run the command with `-verbose' ... but sending the message again is usually not possible, not wanted or would produce different results. This is a cleanup of Philipp's patch. --- uip/send.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/uip/send.c b/uip/send.c index 3ca6772..c2c9f17 100644 --- a/uip/send.c +++ b/uip/send.c @@ -24,8 +24,7 @@ #include int debugsw = 0; /* global */ -int verbosesw = 0; -char *altmsg = NULL; +char *altmsg = NULL; char *annotext = NULL; char *distfile = NULL; @@ -118,9 +117,7 @@ main(int argc, char **argv) debugsw++; /* fall */ case VERBSW: - verbosesw += 2; case NVERBSW: - verbosesw--; vec[vecp++] = --cp; continue; } @@ -653,12 +650,9 @@ sendaux(char **vec, int vecp, char *drft, struct stat *st) if (annotext) { anno(st); } - } - else { + } else { + /* spost failed */ advise(NULL, "%s", strexit(status)); - if (verbosesw <= 0) { - advise(NULL, "Try using -v to get better output"); - } if (distfile) { unlink(drft); if (rename(backup, drft) == NOTOK) { @@ -722,13 +716,13 @@ strexit(int status) return "spost or sendmail killed by signal"; } if (!WIFEXITED(status)) { - return "sendmail stopt for unknown reasen, message not deliverd to anyone"; + return "message not delivered to anyone"; } switch (WEXITSTATUS(status)) { - case EX_TEMPFAIL: - return "Temporary error, maby the MTA hase queued the Mail"; - default: - return "sendmail stopt for unknown reasen, message not deliverd to anyone"; + case EX_TEMPFAIL: + return "Temporary error, maybe the MTA has queued the message"; + default: + return "message not delivered to anyone"; } } -- 1.7.10.4