sched: Rename new_post_select back to post_select.
[paraslash.git] / client.c
index 7f0e3211241a77dad0d6dbe5774f6671e49823f8..90dc432b8829426cd9d4ce081e4f8e20a5fb194e 100644 (file)
--- a/client.c
+++ b/client.c
@@ -95,8 +95,7 @@ static int execute_client_command(const char *cmd, char **result)
        struct exec_task exec_task = {
                .task = {
                        .pre_select = exec_pre_select,
-                       .new_post_select = exec_post_select,
-                       .post_select = NULL,
+                       .post_select = exec_post_select,
                        .status = "client exec task",
                },
                .result_buf = para_strdup(""),
@@ -531,23 +530,21 @@ __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 = {