X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=udp_send.c;h=91550aa8c66836239df07193d46d5d470612767e;hb=8af63afe0ce633fd488f0669614e2d08680f90bc;hp=52947b20610a6b26280755cf0ddb5125ac5ae8a2;hpb=ac4e01ba1a2f302bf31dd511a7aff8da78660b15;p=paraslash.git diff --git a/udp_send.c b/udp_send.c index 52947b20..91550aa8 100644 --- a/udp_send.c +++ b/udp_send.c @@ -18,13 +18,13 @@ #include "error.h" #include "string.h" #include "afh.h" +#include "net.h" #include "server.h" #include "list.h" #include "send.h" #include "sched.h" #include "vss.h" #include "portable_io.h" -#include "net.h" #include "fd.h" #include "close_on_fork.h" @@ -56,6 +56,8 @@ static void udp_close_target(struct sender_client *sc) size_t len; struct udp_target *ut = sc->private_data; + if (process_is_command_handler()) + return; if (ut->sent_fec_eof) return; PARA_NOTICE_LOG("sending FEC EOF\n"); @@ -392,7 +394,7 @@ static void udp_init_target_list(void) struct sender_command_data scd; int i; - INIT_LIST_HEAD(&targets); + init_list_head(&targets); for (i = 0; i < OPT_GIVEN(UDP_TARGET); i++) { const char *arg = lls_string_val(i, OPT_RESULT(UDP_TARGET)); if (udp_resolve_target(arg, &scd) < 0) @@ -425,7 +427,7 @@ static char *udp_help(void) /* Initialize the list of udp targets. */ static void udp_send_init(void) { - INIT_LIST_HEAD(&targets); + init_list_head(&targets); sender_status = SENDER_off; udp_init_target_list(); if (!OPT_GIVEN(UDP_NO_AUTOSTART))