]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - udp_send.c
Replace gettimeofday() by clock_gettime().
[paraslash.git] / udp_send.c
index bc23831147d957c548fcfece7b97e3f13f20c7a6..b1da3167880c63895fd7d2d0f94a01feed620a1f 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.
  */
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -8,7 +8,6 @@
 
 
 #include <regex.h>
 
 
 #include <regex.h>
-#include <sys/time.h>
 #include <sys/socket.h>
 #include <netinet/udp.h>
 #include <net/if.h>
 #include <sys/socket.h>
 #include <netinet/udp.h>
 #include <net/if.h>
@@ -288,7 +287,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 = 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
        if (ret == -ERRNO_TO_PARA_ERROR(ECONNREFUSED)) {
                /*
                 * Happens if meanwhile an ICMP Destination / Port Unreachable