From c6028aa66d8e254a4c52ae376f9f51179a638547 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 1 May 2010 14:44:56 +0100 Subject: [PATCH] fixes --- backends/innduct.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/backends/innduct.c b/backends/innduct.c index 3da59e1..613a85d 100644 --- a/backends/innduct.c +++ b/backends/innduct.c @@ -1,5 +1,7 @@ /* * todo + * - abolish xk_Malloc + * - rename sm_period_counter as it's just about flushes * - manpage: document control master stuff * * debugging rune: @@ -1975,7 +1977,7 @@ static void *feedfile_got_article(oop_source *lp, oop_read *rd, ipf->readcount_ok++; art= xmalloc(sizeof(*art) - 1 + midlen + 1); - memset(art,0,sizeof(art)); + memset(art,0,sizeof(*art)); art->state= art_Unchecked; art->midlen= midlen; art->ipf= ipf; ipf->inprogress++; @@ -2280,7 +2282,7 @@ static void inputfile_reading_stop(InputFile *ipf) { | flsh->rd!=0 | | flsh->rd!=0 | [Separated] | | [Dropping] | main F idle | | main none - | old D tail | | old D tail + | flsh D tail | | flsh D tail | ============= | | ============ | | | | install | ^ | EOF ON D | | defer | EOF ON D @@ -2290,7 +2292,7 @@ static void inputfile_reading_stop(InputFile *ipf) { | flsh->rd==0 | V flsh->rd==0 | [Finishing] | | [Dropping] | main F tail | `. main none - | old D closed | `. old D closed + | flsh D closed | `. flsh D closed | =============== V `. =============== | | `. | | | ALL D PROCESSED `. | ALL D PROCESSED @@ -2303,7 +2305,7 @@ static void inputfile_reading_stop(InputFile *ipf) { DROPPED [Dropped] main none - old none + flsh none some backlog ============== | @@ -2419,6 +2421,9 @@ static void statemc_init(void) { if (file_d) { debug("startup: F!=D => Separated"); startup_set_input_file(file_d); + flushing_input_file= main_input_file; + main_input_file= open_input_file(feedfile); + if (!main_input_file) die("feedfile vanished during startup"); SMS(SEPARATED, 0, "found both old and current feed files"); } else { debug("startup: F exists, D ENOENT => Normal"); @@ -2796,7 +2801,7 @@ static void search_backlog_file(void) { static void preterminate(void) { if (in_child) return; notice_processed(main_input_file,0,"feedfile",""); - notice_processed(flushing_input_file,0,"flushing file",""); + notice_processed(flushing_input_file,0,"flushing",""); if (backlog_input_file) notice_processed(backlog_input_file,0, "backlog file ", backlog_input_file->path); -- 2.30.2