X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=write.c;h=2efe07ce730264be610fc35adc2bc1cdd9fc0721;hp=b692ac5080af8dfee4efd79a95048e6c8ad6999d;hb=081e022105bbfd6c1e56730200919f276b1ff630;hpb=14f817d233309fe9ca2580fa8e4b78fd823b9ab9 diff --git a/write.c b/write.c index b692ac50..2efe07ce 100644 --- a/write.c +++ b/write.c @@ -161,6 +161,17 @@ out: return NULL; } +static void wng_event_handler(struct task *t) +{ + struct writer_node_group *g = t->private_data; + + PARA_INFO_LOG("%s\n", PARA_STRERROR(-t->ret)); + unregister_task(t); + wng_close(g); + wng_destroy(g); +} + + static void idt_event_handler(struct task *t) { int ret; @@ -170,6 +181,7 @@ static void idt_event_handler(struct task *t) wng->buf = sit.buf; wng->loaded = &sit.loaded; wng->input_eof = &sit.eof; + wng->task.event_handler = wng_event_handler; ret = wng_open(wng); if (ret < 0) { PARA_ERROR_LOG("%s\n", PARA_STRERROR(-ret));