X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=client_common.c;h=78b232dbd043caf1dc0ee6ba58b3437000e0d86a;hp=649a1b4fdf49579e653d7b6cd6d9c977524e6171;hb=3f1510c31beb5c053d2f6c510f04a1e7466fce65;hpb=32ffc06c0706f51c3f1dc436911836f1f9aa326e diff --git a/client_common.c b/client_common.c index 649a1b4f..78b232db 100644 --- a/client_common.c +++ b/client_common.c @@ -48,8 +48,7 @@ void client_disconnect(struct client_task *ct) ct->scc.recv = NULL; sc_free(ct->scc.send); ct->scc.send = NULL; - btr_free_node(ct->btrn); - ct->btrn = NULL; + btr_remove_node(&ct->btrn); } /** @@ -334,7 +333,9 @@ static void client_post_select(struct sched *s, struct task *t) size_t n; char buf[CLIENT_BUFSIZE]; - t->error = 0; + ret = task_get_notification(t); + if (ret < 0) + goto out; if (ct->scc.fd < 0) return; switch (ct->status) { @@ -562,7 +563,7 @@ out: if (!ct->use_sideband && ret != -E_SERVER_EOF && ret != -E_BTR_EOF && ret != -E_EOF) PARA_ERROR_LOG("%s\n", para_strerror(-t->error)); - btr_remove_node(btrn); + btr_remove_node(&ct->btrn); } }