X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=vss.c;h=e0b764ab71d43df3cdbd5b309d5f28e6cab5f7d2;hp=1b66a6e5d01cbecb5b08d0e4f17d5808ae8c5d7f;hb=b0d2b25210ac347ab95dfa176d133f6629f0b123;hpb=db74b8bd5f82f4a72cdf5ad6c85dd723e4a386ab diff --git a/vss.c b/vss.c index 1b66a6e5..e0b764ab 100644 --- a/vss.c +++ b/vss.c @@ -885,12 +885,9 @@ static void set_mmd_offset(void) mmd->offset = tv2ms(&offset); } -/** +/* * Compute the timeout for the main select-loop of the scheduler. * - * \param s Pointer to the server scheduler. - * \param t Pointer to the vss task structure. - * * Before the timeout is computed, the current vss status flags are evaluated * and acted upon by calling appropriate functions from the lower layers. * Possible actions include @@ -899,10 +896,10 @@ static void set_mmd_offset(void) * - shutdown of all senders (stop/pause command), * - reposition the stream (ff/jmp command). */ -static void vss_pre_select(struct sched *s, struct task *t) +static void vss_pre_select(struct sched *s, void *context) { int i; - struct vss_task *vsst = task_context(t); + struct vss_task *vsst = context; if (!vsst->map || vss_next() || vss_paused() || vss_repos()) { struct fec_client *fc, *tmp; @@ -924,7 +921,8 @@ static void vss_pre_select(struct sched *s, struct task *t) tv_add(now, &vsst->announce_tv, &vsst->data_send_barrier); set_eof_barrier(vsst); mmd->chunks_sent = 0; - mmd->current_chunk = mmd->repos_request; + mmd->current_chunk = afh_get_start_chunk(mmd->repos_request, + &mmd->afd.afhi); mmd->new_vss_status_flags &= ~VSS_REPOS; set_mmd_offset(); } @@ -1126,10 +1124,10 @@ static void vss_send(struct vss_task *vsst) } } -static int vss_post_select(struct sched *s, struct task *t) +static int vss_post_select(struct sched *s, void *context) { int ret, i; - struct vss_task *vsst = task_context(t); + struct vss_task *vsst = context; if (mmd->sender_cmd_data.cmd_num >= 0) { int num = mmd->sender_cmd_data.cmd_num,