X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=udp_recv.c;h=15cf73eb210dd0354b27abf795e60fdd1959377b;hp=cff55f2dd9845a4b90098d28badd4b3d9357a3cb;hb=465f84546f810776ea6c4bd06fec34ff8452e933;hpb=625fdbbafaf3842753bff02b349eaaf9554d846d diff --git a/udp_recv.c b/udp_recv.c index cff55f2d..15cf73eb 100644 --- a/udp_recv.c +++ b/udp_recv.c @@ -1,13 +1,18 @@ /* - * Copyright (C) 2005-2013 Andre Noll + * Copyright (C) 2005-2014 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ /** \file udp_recv.c Paraslash's udp receiver */ +#include #include #include #include +#include +#include +#include +#include #include "para.h" #include "error.h" @@ -43,7 +48,7 @@ static int udp_check_eof(size_t sz, struct iovec iov[2]) } if (memcmp(iov[0].iov_base, FEC_EOF_PACKET, iov[0].iov_len) != 0) return 0; - if (memcmp(iov[1].iov_base, FEC_EOF_PACKET + iov[0].iov_len, + if (memcmp(iov[1].iov_base, &FEC_EOF_PACKET[iov[0].iov_len], FEC_EOF_PACKET_LEN - iov[0].iov_len) != 0) return 0; return -E_RECV_EOF; @@ -220,9 +225,6 @@ void udp_recv_init(struct receiver *r) r->post_select = udp_recv_post_select; r->parse_config = udp_recv_parse_config; r->free_config = udp_recv_free_config; - r->help = (struct ggo_help) { - .short_help = udp_recv_args_info_help, - .detailed_help = udp_recv_args_info_detailed_help - }; + r->help = (struct ggo_help)DEFINE_GGO_HELP(udp_recv); udp_recv_cmdline_parser_free(&dummy); }