X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=write.c;h=6b574414b6b13c227c98b008addd28f4b2302b33;hp=dda1b705c19151000dd08098f99d2b9d4c71f11c;hb=4990334538fe7f18964a6027b22d47c7640c3ec0;hpb=a365b8263a0d7a1673699bdf454677c95b38eb95 diff --git a/write.c b/write.c index dda1b705..6b574414 100644 --- a/write.c +++ b/write.c @@ -8,7 +8,6 @@ #include #include -#include #include #include "para.h" @@ -23,6 +22,7 @@ #include "write_common.h" #include "fd.h" #include "error.h" +#include "version.h" INIT_WRITE_ERRLISTS; @@ -209,6 +209,20 @@ static int main_btr(struct sched *s) s->default_timeout.tv_sec = 10; s->default_timeout.tv_usec = 50000; ret = schedule(s); + if (ret >= 0) { + int j; + for (j = 0; j < i; j++) { + struct task *t = &wns[j].task; + assert(t->error < 0); + if (t->error != -E_WRITE_COMMON_EOF + && t->error != -E_BTR_EOF) { + PARA_ERROR_LOG("%s: %s\n", t->status, + para_strerror(-t->error)); + if (ret >= 0) + ret = t->error; + } + } + } out: for (i--; i >= 0; i--) { struct writer_node *wn = wns + i; @@ -216,6 +230,7 @@ out: w->close(wn); btr_free_node(wn->btrn); + w->free_config(wn->conf); free(wn->conf); } free(wns);