X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=udp_send.c;h=7a1a89f73e1ab79d91fa2e0978072eaf9e10fc46;hp=f39b4f1435d1189308637c306a5be13e4cf855a1;hb=4990334538fe7f18964a6027b22d47c7640c3ec0;hpb=b5b5d00eea33eccd3d2d75057c5254bf85568b00 diff --git a/udp_send.c b/udp_send.c index f39b4f14..7a1a89f7 100644 --- a/udp_send.c +++ b/udp_send.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2010 Andre Noll + * Copyright (C) 2005-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -9,11 +9,11 @@ #include #include -#include #include #include #include #include +#include #include "server.cmdline.h" #include "para.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;