X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=grab_client.c;h=6769ee522ef3dfcd7dac66fb0c299c4ee0e37ef7;hp=2dfb295b8ce87fcb5f165bcfd4b3c25f3bdb5b50;hb=d7cda933daa35663b2b9b61d62cb514afa37fd18;hpb=f2a7b00cf72104a38733b7bf3add9fb19dd71c93 diff --git a/grab_client.c b/grab_client.c index 2dfb295b..6769ee52 100644 --- a/grab_client.c +++ b/grab_client.c @@ -32,6 +32,7 @@ #include "audiod.h" #include "error.h" #include "string.h" +#include "fd.h" /** grab clients that are not yet attached to a filter node */ struct list_head inactive_grab_client_list; @@ -56,12 +57,10 @@ static int gc_write(char *buf, size_t len, struct filter_callback *fcb) // PARA_INFO_LOG("writing %d bytes to fd %d\n", len, gc->fd); fd_set wfds; - do { - FD_ZERO(&wfds); - FD_SET(gc->fd, &wfds); - ret = select(gc->fd + 1, NULL, &wfds, NULL, &tv); - } while (ret == EAGAIN || ret == EINTR); - if (ret != 1) { + FD_ZERO(&wfds); + FD_SET(gc->fd, &wfds); + ret = para_select(gc->fd + 1, NULL, &wfds, &tv); + if (ret <= 0) { if (gc->mode == GRAB_PEDANTIC) return -E_PEDANTIC_GRAB; if (gc->mode == GRAB_SLOPPY)