git-svn: trunk@3140
Nigel Horne authored on 2007/07/11 19:16:30... | ... |
@@ -4494,7 +4494,7 @@ nonblock_connect(int sock, const struct sockaddr *addr, socklen_t addrlen, int s |
4494 | 4494 |
for (;;) { |
4495 | 4495 |
fd_set fds; |
4496 | 4496 |
struct timeval now; |
4497 |
- struct timeval wait; |
|
4497 |
+ struct timeval waittime; |
|
4498 | 4498 |
int n; |
4499 | 4499 |
|
4500 | 4500 |
/* Force timeout if we ran out of time */ |
... | ... |
@@ -4505,14 +4505,14 @@ nonblock_connect(int sock, const struct sockaddr *addr, socklen_t addrlen, int s |
4505 | 4505 |
break; /* failed */ |
4506 | 4506 |
} |
4507 | 4507 |
|
4508 |
- /* Calculate into 'wait' how long to wait */ |
|
4509 |
- timersub(&timeout, &now, &wait); /* wait = timeout - now */ |
|
4508 |
+ /* Calculate into 'waittime' how long to wait */ |
|
4509 |
+ timersub(&timeout, &now, &waittime); /* wait = timeout - now */ |
|
4510 | 4510 |
|
4511 | 4511 |
/* Init fds with 'sock' as the only fd */ |
4512 | 4512 |
FD_ZERO(&fds); |
4513 | 4513 |
FD_SET(sock, &fds); |
4514 | 4514 |
|
4515 |
- n = select(numfd, 0, &fds, 0, &wait); |
|
4515 |
+ n = select(numfd, 0, &fds, 0, &waittime); |
|
4516 | 4516 |
if (n < 0) { |
4517 | 4517 |
cli_warnmsg("nonblock_connect: select() failure %d: errno=%d: %s\n", |
4518 | 4518 |
select_failures, errno, strerror(errno)); |