]> git.tue.mpg.de Git - paraslash.git/commitdiff
Always respect the data_send_barrier.
authorAndre Noll <maan@systemlinux.org>
Sun, 11 Jan 2009 02:33:08 +0000 (03:33 +0100)
committerAndre Noll <maan@systemlinux.org>
Sun, 11 Jan 2009 02:33:08 +0000 (03:33 +0100)
vss.c

diff --git a/vss.c b/vss.c
index 0943efac0def4dde3530682832526abb726c21f2..48bfa7d75c60049b87f3bdd09906cfcb17527aac 100644 (file)
--- 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);
 }