Mailing List Archive

svn commit: r423255 - /spamassassin/branches/3.1/spamc/spamc.c
Author: felicity
Date: Tue Jul 18 14:15:29 2006
New Revision: 423255

URL: http://svn.apache.org/viewvc?rev=423255&view=rev
Log:
bug 4991: 'spamc -y' would return the entire message on error (connection failure, etc.) just print a blank line instead.

Modified:
spamassassin/branches/3.1/spamc/spamc.c

Modified: spamassassin/branches/3.1/spamc/spamc.c
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.1/spamc/spamc.c?rev=423255&r1=423254&r2=423255&view=diff
==============================================================================
--- spamassassin/branches/3.1/spamc/spamc.c (original)
+++ spamassassin/branches/3.1/spamc/spamc.c Tue Jul 18 14:15:29 2006
@@ -836,6 +836,17 @@
else if (flags & SPAMC_LEARN) {
message_cleanup(&m);
}
+ else if (flags & SPAMC_SYMBOLS) {
+ /* bug 4991: -y should only output a blank line on connection failure */
+ full_write(out_fd, 1, "\n", 1);
+ message_cleanup(&m);
+ if (use_exit_code) {
+ ret = result;
+ }
+ else if (flags & SPAMC_SAFE_FALLBACK) {
+ ret = EX_OK;
+ }
+ }
else {
message_dump(STDIN_FILENO, out_fd, &m);
message_cleanup(&m);