chiark / gitweb /
fix a const-correctness bug
[inn-innduct.git] / backends / innduct.c
index fc46fd3669ccb7b9f7c091f4c059d680b2b427f6..c2aeb9dbf0b4824d1fc07c3cc6cda1ef7460b514 100644 (file)
@@ -543,7 +543,7 @@ static int nocheck, nocheck_reported, in_child;
 /* for logging, simulation, debugging, etc. */
 int simulate_flush= -1;
 int logv_use_syslog;
-static char *logv_prefix="";
+static const char *logv_prefix="";
 
 /*========== logging ==========*/
 
@@ -2179,12 +2179,15 @@ static void *feedfile_got_article(oop_source *lp, oop_read *rd,
   art->offset= old_offset;
   art->blanklen= recsz;
   strcpy(art->messageid, space+1);
-  LIST_ADDTAIL(ipf->queue, art);
 
-  if (ipf->autodefer >= 0)
+  if (ipf->autodefer >= 0) {
     article_autodefer(ipf, art);
-  else if (ipf==backlog_input_file)
-    article_check_expired(art);
+  } else {
+    LIST_ADDTAIL(ipf->queue, art);
+
+    if (ipf==backlog_input_file)
+      article_check_expired(art);
+  }
 
   if (sms==sm_NORMAL && ipf==main_input_file &&
       ipf->offset >= target_max_feedfile_size)
@@ -2809,7 +2812,8 @@ static void statemc_check_flushing_done(void) {
 
 static void *statemc_check_input_done(oop_source *lp, struct timeval now,
                                      void *u) {
-  assert(!inputfile_is_done(main_input_file));
+  /* main input file may be idle but if so that's because
+   * we haven't got to it yet, but that doesn't mean it's really done */
   statemc_check_flushing_done();
   statemc_check_backlog_done();
   return OOP_CONTINUE;