]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - stat.c
para_server/para_audiod: new option --group
[paraslash.git] / stat.c
diff --git a/stat.c b/stat.c
index e3773df6403fb72d0c5163efa19c2f0ea43f7392..7346f097e61e9933759563d64af7e7b2dedd3eb6 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -25,6 +25,7 @@
 #include "list.h"
 #include "error.h"
 #include "string.h"
+#include "fd.h"
 
 /** the maximal number of simultaneous connections */
 #define MAX_STAT_CLIENTS 50
@@ -161,10 +162,8 @@ void stat_client_write(char *msg, int itemnum)
                FD_ZERO(&wfds);
                FD_SET(fd, &wfds);
 //             PARA_DEBUG_LOG("%s: p=%lx\n", __func__, (long)p);
-               do
-                       ret = select(fd + 1, NULL, &wfds, NULL, &tv);
-               while (ret < 0 && errno == EINTR);
-               if (ret) {
+               ret = para_select(fd + 1, NULL, &wfds, &tv);
+               if (ret > 0) {
                        ret = write(fd, msg, len);
                        PARA_DEBUG_LOG("dumped %s to fd %d, ret = %d\n", msg, fd, ret);
                        if (ret == len )