X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=vss.c;h=8a916a2dddb4e11871498df2eb15c013735e6a14;hp=1b66a6e5d01cbecb5b08d0e4f17d5808ae8c5d7f;hb=764933011fb465b687be94abee74f4fbca9b6884;hpb=db74b8bd5f82f4a72cdf5ad6c85dd723e4a386ab diff --git a/vss.c b/vss.c index 1b66a6e5..8a916a2d 100644 --- a/vss.c +++ b/vss.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1997-2014 Andre Noll + * Copyright (C) 1997-2014 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -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,