1 diff -Nur a/redir.c b/redir.c
2 --- a/redir.c 2005-10-22 22:44:39.504061784 -0400
3 +++ b/redir.c 2005-10-22 22:47:14.746461352 -0400
5 /* Record start time */
6 start_time = (unsigned int) time(NULL);
9 - timeout.tv_sec = timeout_secs;
10 - timeout.tv_usec = 0;
12 /* file descriptor bits */
14 FD_SET(insock, &iofds);
17 (void) memcpy(&c_iofds, &iofds, sizeof(iofds));
19 + /* Set up timeout, Linux returns seconds left in this structure
20 + * so we have to reset it before each select(). */
21 + timeout.tv_sec = timeout_secs;
22 + timeout.tv_usec = 0;
25 if (select(max_fd + 1,
29 (timeout_secs ? &timeout : NULL)) <= 0) {
30 - /* syslog(LLEV,"connection timeout: %d sec",timeout.tv_sec);*/
33 + syslog(LOG_NOTICE,"connection timeout: %d sec",timeout_secs);
38 if(FD_ISSET(insock, &c_iofds)) {