From: Andre Noll Date: Sun, 31 Mar 2013 18:54:10 +0000 (+0000) Subject: client supervisor: Switch to the alternative post select method. X-Git-Tag: v0.4.13~39^2~4 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=38aeac398e716ff7ae6919acbdf498ed09ab0bc1 client supervisor: Switch to the alternative post select method. --- diff --git a/client.c b/client.c index 7f0e3211..89171a23 100644 --- a/client.c +++ b/client.c @@ -531,27 +531,26 @@ __noreturn static void print_completions(void) #endif /* HAVE_READLINE */ -static void supervisor_post_select(struct sched *s, struct task *t) +static int supervisor_post_select(struct sched *s, __a_unused struct task *t) { - if (ct->task.error < 0) { - t->error = ct->task.error; - return; - } + if (ct->task.error < 0) + return ct->task.error; if (ct->status == CL_SENDING) { stdin_set_defaults(&sit); register_task(s, &sit.task); - t->error = -E_TASK_STARTED; - return; + return -E_TASK_STARTED; } if (ct->status == CL_RECEIVING) { stdout_set_defaults(&sot); register_task(s, &sot.task); - t->error = -E_TASK_STARTED; return; + return -E_TASK_STARTED; } + return 0; } static struct task svt = { - .post_select = supervisor_post_select, + .new_post_select = supervisor_post_select, + .post_select = NULL, .status = "supervisor task" };