Doxify error2.c and add GPL header.
[paraslash.git] / udp_send.c
index bc23831147d957c548fcfece7b97e3f13f20c7a6..7930f09234486d3448b196ba45ae3b178845d001 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2011 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2005-2013 Andre Noll <maan@systemlinux.org>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -8,7 +8,7 @@
 
 
 #include <regex.h>
-#include <sys/time.h>
+#include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/udp.h>
 #include <net/if.h>
@@ -288,7 +288,7 @@ static void udp_send_fec(struct sender_client *sc, char *buf, size_t len)
        ret = udp_check_socket_state(sc);
        if (ret < 0)
                goto fail;
-       ret = write_nonblock(sc->fd, buf, len);
+       ret = xwrite(sc->fd, buf, len);
        if (ret == -ERRNO_TO_PARA_ERROR(ECONNREFUSED)) {
                /*
                 * Happens if meanwhile an ICMP Destination / Port Unreachable