]> git.pond.sub.org Git - empserver/blobdiff - src/lib/empthread/io.c
Fix pthread's empth_select() not to change the timeout
[empserver] / src / lib / empthread / io.c
index 85cad537d714fbf61bc335dc96ec0f5169e2a73d..5d4d06c46f8b69e571453f7d8e292f2e24dc9e0d 100644 (file)
@@ -121,7 +121,6 @@ io_input(struct iop *iop, int waitforinput)
     char buf[IO_BUFSIZE];
     int cc;
     int res;
     char buf[IO_BUFSIZE];
     int cc;
     int res;
-    struct timeval timeout = iop->input_timeout;
 
     /* Not a read IOP */
     if ((iop->flags & IO_READ) == 0) {
 
     /* Not a read IOP */
     if ((iop->flags & IO_READ) == 0) {
@@ -135,7 +134,7 @@ io_input(struct iop *iop, int waitforinput)
     }
     /* Wait for the file to have input. */
     if (waitforinput) {
     }
     /* Wait for the file to have input. */
     if (waitforinput) {
-       res = empth_select(iop->fd, EMPTH_FD_READ, &timeout);
+       res = empth_select(iop->fd, EMPTH_FD_READ, &iop->input_timeout);
        if (res < 0) {
            iop->flags |= IO_ERROR;
            return -1;
        if (res < 0) {
            iop->flags |= IO_ERROR;
            return -1;