Fix initialization of fec_client_list.
authorAndre Noll <maan@systemlinux.org>
Thu, 5 Mar 2009 21:00:41 +0000 (22:00 +0100)
committerAndre Noll <maan@systemlinux.org>
Thu, 5 Mar 2009 21:00:41 +0000 (22:00 +0100)
The list must be initialized _before_ the init functions of the
senders are called, because the udp_send_init() might add fec clients
to that list.

vss.c

diff --git a/vss.c b/vss.c
index 481c0b6..4efe38f 100644 (file)
--- a/vss.c
+++ b/vss.c
@@ -834,6 +834,7 @@ void init_vss_task(int afs_socket)
        vsst->task.post_select = vss_post_select;
        ms2tv(announce_time, &vsst->announce_tv);
        PARA_INFO_LOG("announce timeval: %lums\n", tv2ms(&vsst->announce_tv));
+       INIT_LIST_HEAD(&fec_client_list);
        for (i = 0; senders[i].name; i++) {
                PARA_NOTICE_LOG("initializing %s sender\n", senders[i].name);
                senders[i].init(&senders[i]);
@@ -851,6 +852,5 @@ void init_vss_task(int afs_socket)
                tv_add(&vsst->autoplay_barrier, &vsst->announce_tv,
                        &vsst->data_send_barrier);
        }
-       INIT_LIST_HEAD(&fec_client_list);
        register_task(&vsst->task);
 }