Merge branch 'refs/heads/t/play_fix'
[paraslash.git] / afh_recv.c
index 89722fe..92e9e83 100644 (file)
@@ -61,7 +61,6 @@ static int afh_execute(struct btr_node *btrn, const char *cmd, char **result)
                        return -ERRNO_TO_PARA_ERROR(EINVAL);
                pard->first_chunk = afh_get_start_chunk(x, &pard->afhi);
                pard->current_chunk = pard->first_chunk;
-               rn->task.error = 0;
                return 1;
        }
        return -E_BTR_NAVAIL;
@@ -155,14 +154,14 @@ static void afh_recv_close(struct receiver_node *rn)
        freep(&rn->private_data);
 }
 
-static void afh_recv_pre_select(struct sched *s, struct task *t)
+static void afh_recv_pre_select(struct sched *s, void *context)
 {
-       struct receiver_node *rn = container_of(t, struct receiver_node, task);
+       struct receiver_node *rn = context;
        struct private_afh_recv_data *pard = rn->private_data;
        struct afh_info *afhi = &pard->afhi;
        struct afh_recv_args_info *conf = rn->conf;
        struct timeval chunk_time;
-       int state = generic_recv_pre_select(s, t);
+       int state = generic_recv_pre_select(s, rn);
 
        if (state <= 0)
                return;
@@ -175,9 +174,9 @@ static void afh_recv_pre_select(struct sched *s, struct task *t)
        sched_request_barrier_or_min_delay(&chunk_time, s);
 }
 
-static int afh_recv_post_select(__a_unused struct sched *s, struct task *t)
+static int afh_recv_post_select(__a_unused struct sched *s, void *context)
 {
-       struct receiver_node *rn = container_of(t, struct receiver_node, task);
+       struct receiver_node *rn = context;
        struct afh_recv_args_info *conf = rn->conf;
        struct private_afh_recv_data *pard = rn->private_data;
        struct btr_node *btrn = rn->btrn;