X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=udp_send.c;h=880d7957dbd4430819c917cb4b6a9533c96d321c;hp=003757ef8a94b2af8c7218d31fdaca6489ed765b;hb=8aa0f575bcca12ab63ab53141c2144448c457478;hpb=92f089b820b45a5dbdc5b4f69d596105d5acba68 diff --git a/udp_send.c b/udp_send.c index 003757ef..880d7957 100644 --- a/udp_send.c +++ b/udp_send.c @@ -9,11 +9,11 @@ #include #include -#include #include #include #include #include +#include #include "server.cmdline.h" #include "para.h" @@ -24,11 +24,11 @@ #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 "sched.h" #include "close_on_fork.h" /** @@ -56,8 +56,13 @@ static void udp_close_target(struct sender_client *sc) const char *buf; size_t len = vss_get_fec_eof_packet(&buf); - /* ignore return value, closing the target anyway. */ - (void)write(sc->fd, buf, len); + /* + * Ignore the return value of wirte() since we are closing the target + * anyway. The sole purpose of the "do_nothing" statement is to silence + * gcc. + */ + if (write(sc->fd, buf, len)) + do_nothing; } static void udp_delete_target(struct sender_client *sc, const char *msg) @@ -317,6 +322,7 @@ static int udp_com_add(struct sender_command_data *scd) ut->fcp.data_slices_per_group = scd->data_slices_per_group; ut->fcp.init_fec = udp_init_fec; ut->fcp.send_fec = udp_send_fec; + ut->fcp.need_periodic_header = true; sc->private_data = ut; sc->fd = -1;