X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=write.c;fp=write.c;h=440778407b3c8388e278a0cd79f505fe016c28ce;hb=ba0c0797c76a2c94cb4a9f6938274fea5ba0226f;hp=15bbb4a6399dd0739b41d3ee6c7b73e4c6af5fbc;hpb=5254df7e470dc49a29f91fa8185b98c40246f5ea;p=paraslash.git diff --git a/write.c b/write.c index 15bbb4a6..44077840 100644 --- a/write.c +++ b/write.c @@ -123,16 +123,17 @@ static int setup_and_schedule(void) s.default_timeout.tv_usec = 50000; ret = schedule(&s); if (ret >= 0) { - int j; + int j, ts; 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)); + struct writer_node *wn = wns + j; + ts = task_status(wn->task); + assert(ts < 0); + if (ts != -E_WRITE_COMMON_EOF && ts != -E_BTR_EOF) { + const char *name = writer_names[wn->writer_num]; + PARA_ERROR_LOG("%s: %s\n", name, + para_strerror(-ts)); if (ret >= 0) - ret = t->error; + ret = ts; } } }