Mailing List Archive

svn commit: r422963 - /spamassassin/trunk/spamc/spamc.c
Author: felicity
Date: Mon Jul 17 21:39:18 2006
New Revision: 422963

URL: http://svn.apache.org/viewvc?rev=422963&view=rev
Log:
bug 4991: if 'spamc -y' is called, and the connection to spamd fails, just print out a blank line and not the whole message

Modified:
spamassassin/trunk/spamc/spamc.c

Modified: spamassassin/trunk/spamc/spamc.c
URL: http://svn.apache.org/viewvc/spamassassin/trunk/spamc/spamc.c?rev=422963&r1=422962&r2=422963&view=diff
==============================================================================
--- spamassassin/trunk/spamc/spamc.c (original)
+++ spamassassin/trunk/spamc/spamc.c Mon Jul 17 21:39:18 2006
@@ -880,6 +880,17 @@
else if (flags & (SPAMC_LEARN|SPAMC_PING) ) {
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);