X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=write_common.c;h=cfdabe4821bc6af60a12b99f3c9c5ff0b03d60d5;hp=7fb8d12337b6fdc28a1af741e5a0cd6a74f21ea4;hb=2a8029478dfc65f0c935d864faf4aea9e3deb27d;hpb=4b6458e9fc11eb741200dfebd8dc96a333956e4b diff --git a/write_common.c b/write_common.c index 7fb8d123..cfdabe48 100644 --- a/write_common.c +++ b/write_common.c @@ -45,9 +45,10 @@ static void wng_post_select(__a_unused struct sched *s, struct task *t) min_written = PARA_MIN(min_written, t->ret); } *g->loaded -= min_written; - if (!*g->loaded && *g->input_eof) + if (!*g->loaded && *g->input_eof) { + g->eof = 1; t->ret = -E_WNG_EOF; - else + } else t->ret = 1; if (*g->loaded && min_written) memmove(g->buf, g->buf + min_written, *g->loaded); @@ -57,6 +58,7 @@ int wng_open(struct writer_node_group *g) { int i, ret = 1; + PARA_NOTICE_LOG("opening wng with %d writer(s)\n", g->num_writers); FOR_EACH_WRITER_NODE(i, g) { struct writer_node *wn = &g->writer_nodes[i]; ret = wn->writer->open(wn); @@ -92,6 +94,7 @@ void wng_close(struct writer_node_group *g) { int i; + PARA_NOTICE_LOG("closing wng with %d writer(s)\n", g->num_writers); FOR_EACH_WRITER_NODE(i, g) { struct writer_node *wn = &g->writer_nodes[i]; unregister_task(&wn->task);