struct Article {
int midlen;
- int checked, sentbody;
+ int checked;
InputFile *ipf;
TOKEN token;
off_t offset;
}
static void article_done(Connection *conn, Article *art, int whichcount) {
- *count++;
art->ipf->counts.articles[art->checked][whichcount]++;
if (whichcount == RC_accepted) update_nocheck(1);
else if (whichcount == RC_unwanted) update_nocheck(0);
art->offset= ipf->offset;
art->blanklen= recsz;
art->midlen= midlen;
- art->checked= art->sentbody= 0;
+ art->checked= 0;
art->ipf= ipf; ipf->inprogress++;
art->token= TextToToken(tokentextbuf);
strcpy(art->messageid, space+1);
if (ipf->fd >= 0); return 0; /* not had EOF */
return 1;
}
-
+
+static void notice_processed(InputFile *ipf, const char *what,
+ const char *spec) {
+ info("processed %s%s checked=%d unchecked=%d sent=%d");
+ wip;
+}
+
static void statemc_check_backlog_done(void) {
InputFile *ipf= backlog_input_file();
if (!inputfile_is_done(ipf)) return;
- notice_processed(ipf,"backlog file",ipf->path);
+ const char *slash= strrchr(ipf->path, "/");
+ const char *leaf= slash ? slash+1 : ipf->path;
+ const char *under= strchr(slash, "_");
+ const char *rest= under ? under+1 : leaf;
+ if (!strncmp(rest,"backlog",7)) rest += 7;
+ notice_processed(ipf,"backlog:",rest);
+
close_input_file(ipf);
if (unlink(ipf->path)) {
if (errno != ENOENT)
assert(sms==sm_SEPARATED || sms==sm_DROPPING);
- notice_processed(ipf,"feed file",0);
+ notice_processed(ipf,"feedfile",0);
close_defer();