From: Andre Noll Date: Sun, 11 Jan 2009 02:33:08 +0000 (+0100) Subject: Always respect the data_send_barrier. X-Git-Tag: v0.3.4~75^2~23 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=933eed80c988c0d242cb724143f82a4484a830fb;p=paraslash.git Always respect the data_send_barrier. --- diff --git a/vss.c b/vss.c index 0943efac..48bfa7d7 100644 --- a/vss.c +++ b/vss.c @@ -280,13 +280,11 @@ static void vss_pre_select(struct sched *s, struct task *t) tv_add(&mmd->afd.afhi.eof_tv, now, &vsst->eof_barrier); mmd->chunks_sent = 0; } else if (vss_repos()) { - tv_add(now, &vsst->announce_tv, &vsst->data_send_barrier); tv_add(&mmd->afd.afhi.eof_tv, now, &vsst->eof_barrier); mmd->chunks_sent = 0; mmd->current_chunk = mmd->repos_request; mmd->new_vss_status_flags &= ~VSS_REPOS; } - if (need_to_request_new_audio_file(vsst)) { PARA_DEBUG_LOG("ready and playing, but no audio file\n"); para_fd_set(vsst->afs_socket, &s->wfds, &s->max_fileno); @@ -377,7 +375,6 @@ static void recv_afs_result(struct vss_task *vsst) mmd->events++; mmd->num_played++; mmd->new_vss_status_flags &= (~VSS_NEXT); - tv_add(now, &vsst->announce_tv, &vsst->data_send_barrier); afh_get_header(&mmd->afd.afhi, vsst->map, &vsst->header_buf, &vsst->header_len); return; @@ -466,6 +463,8 @@ static void vss_post_select(struct sched *s, struct task *t) continue; senders[i].post_select(&s->rfds, &s->wfds); } + if (vss_playing() && !(mmd->vss_status_flags & VSS_PLAYING)) + tv_add(now, &vsst->announce_tv, &vsst->data_send_barrier); vss_send_chunk(vsst); }