X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Ftransport.c;h=ef523657ea05b36f122ade55b8c838a22e9d2a50;hb=dd09071d45761ca63f50e60eff5eed4f8e063a74;hp=0c2c6e29af9c713c20419a7ae8670aa622a55de0;hpb=e3e281ccf9d8777d0df98ddd644720573e0343d1;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/transport.c b/src/src/transport.c index 0c2c6e29a..ef523657e 100644 --- a/src/src/transport.c +++ b/src/src/transport.c @@ -253,7 +253,6 @@ for (int i = 0; i < 100; i++) for(;;) { - fd_set fds; /* This code makes use of alarm() in order to implement the timeout. This isn't a very tidy way of doing things. Using non-blocking I/O with select() provides a neater approach. However, I don't know how to do this when TLS is @@ -281,8 +280,7 @@ for (int i = 0; i < 100; i++) if (rc >= 0 || errno != ENOTCONN || connretry <= 0) break; - FD_ZERO(&fds); FD_SET(fd, &fds); - select(fd+1, NULL, &fds, NULL, NULL); /* could set timout? */ + poll_one_fd(fd, POLLOUT, -1); /* could set timeout? retval check? */ connretry--; } @@ -1398,7 +1396,7 @@ if (write_pid > 0) yield = FALSE; } else if (!ok) - { + { /* Try to drain the pipe; read fails are don't care */ int dummy = read(pfd[pipe_read], (void *)&save_errno, sizeof(int)); dummy = read(pfd[pipe_read], (void *)&tctx->addr->more_errno, sizeof(int)); dummy = read(pfd[pipe_read], (void *)&tctx->addr->delivery_time, sizeof(struct timeval));