diff options
author | mhsin <mhsin@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2007-08-19 14:44:46 +0800 |
---|---|---|
committer | mhsin <mhsin@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2007-08-19 14:44:46 +0800 |
commit | f6b74576d15853ca74ae7c7255d0a28d876dafcc (patch) | |
tree | 7526c2747646e8599965d0a082f7339f35a7f06b | |
parent | 77aab324ff76e9f6d44911ec76233e94ea370ba8 (diff) | |
download | pttbbs-f6b74576d15853ca74ae7c7255d0a28d876dafcc.tar pttbbs-f6b74576d15853ca74ae7c7255d0a28d876dafcc.tar.gz pttbbs-f6b74576d15853ca74ae7c7255d0a28d876dafcc.tar.bz2 pttbbs-f6b74576d15853ca74ae7c7255d0a28d876dafcc.tar.lz pttbbs-f6b74576d15853ca74ae7c7255d0a28d876dafcc.tar.xz pttbbs-f6b74576d15853ca74ae7c7255d0a28d876dafcc.tar.zst pttbbs-f6b74576d15853ca74ae7c7255d0a28d876dafcc.zip |
* Add more verbose log.refactor@3551
* Fix mtime == -1 problem.
* Discard some article with return code 441.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3551 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | innbbsd/bbslink.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/innbbsd/bbslink.c b/innbbsd/bbslink.c index 618ff7f5..b23c0bdc 100644 --- a/innbbsd/bbslink.c +++ b/innbbsd/bbslink.c @@ -1,3 +1,4 @@ +#include "antisplam.h" #if defined( LINUX ) #include "innbbsconf.h" #include "bbslib.h" @@ -7,7 +8,6 @@ #include "innbbsconf.h" #include "bbslib.h" #endif -#include "antisplam.h" #include <sys/mman.h> @@ -577,7 +577,7 @@ read_outgoing(sover) strncpy(MSGID_BUF, msgid, sizeof MSGID_BUF); } sover->msgid = MSGID; - if (mtime == -1) { + if ((mtime == -1) || (mtime == 4294967295)) { static char BODY_BUF[MAXBUFLEN]; strncpy(BODY_BUF, fileglue("%s\r\n", subject), sizeof BODY_BUF); @@ -754,7 +754,11 @@ post_article(node, site, sover, textline) char *bodyp, *body; if (Verbose) + { fprintf(stdout, "<post_article> %s %s %s\n", site, filename, msgid); + if(NNTPHOST && *NNTPHOST) + printf(" ==> NNTPHOST: %s\n", NNTPHOST); + } if (NoAction && Verbose) { printf(" ==>%s\n", sover->path); printf(" ==>%s:%s\n", sover->from, sover->group); @@ -862,8 +866,12 @@ post_article(node, site, sover, textline) return 0; } else { bbslog("<bbslink> :Err: %d %s of <%s>\n", status, (char *)tcpmessage(), msgid); + if(Verbose) + printf(":Warn: %d %s <%s>\n", status, (char *)tcpmessage(), msgid); if (!strstr(tcpmessage(), "Article not posted")&& - !strstr(tcpmessage(), "435 Duplicate")) + !strstr(tcpmessage(), "435 Duplicate") && + !strstr(tcpmessage(), "No valid newsgroups") && + (strncmp(tcpmessage(), " 437 ", 5) != 0)) queuefeed(node, textline); return 0; } |