summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormhsin <mhsin@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-08-19 14:44:46 +0800
committermhsin <mhsin@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-08-19 14:44:46 +0800
commitf6b74576d15853ca74ae7c7255d0a28d876dafcc (patch)
tree7526c2747646e8599965d0a082f7339f35a7f06b
parent77aab324ff76e9f6d44911ec76233e94ea370ba8 (diff)
downloadpttbbs-refactor@3551.tar
pttbbs-refactor@3551.tar.gz
pttbbs-refactor@3551.tar.bz2
pttbbs-refactor@3551.tar.lz
pttbbs-refactor@3551.tar.xz
pttbbs-refactor@3551.tar.zst
pttbbs-refactor@3551.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.c14
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;
}