]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - recv.c
introduce para_select()
[paraslash.git] / recv.c
diff --git a/recv.c b/recv.c
index 13c5c420d35059d80fa25ba4e6c9cb73551f9b06..ba1cfd20bba03651387e1bb1826baa0592ab2b46 100644 (file)
--- a/recv.c
+++ b/recv.c
 
 #include "recv.h"
 #include "recv.cmdline.h"
+#include "fd.h"
 #include "error.h"
 
 struct gengetopt_args_info conf;
 
 INIT_RECV_ERRLISTS;
 
-__printf_2_3 void para_log(int ll, char* fmt,...)
+__printf_2_3 void para_log(int ll, const char* fmt,...)
 {
        va_list argp;
 
@@ -87,10 +88,8 @@ recv:
        max = MAX(max, ret);
 
        PARA_DEBUG_LOG("timeout: %lums\n", tv2ms(&timeout));
-       ret = select(max + 1, &rfds, &wfds, NULL, &timeout);
+       ret = para_select(max + 1, &rfds, &wfds, &timeout);
        if (ret < 0) {
-               if (errno == EINTR || errno == EAGAIN)
-                       goto recv;
                ret = -E_RECV_SELECT;
                goto out;
        }