version 1.19, 2006/07/24 17:29:58 |
version 1.20, 2006/07/26 09:10:03 |
|
|
|
|
/* send data to server and wait for server ACK */ |
/* send data to server and wait for server ACK */ |
for (timeouts = 0, error = 0; !intrflag;) { |
for (timeouts = 0, error = 0; !intrflag;) { |
if (timeouts == maxtimeout) { |
if (timeouts >= maxtimeout) { |
printtimeout(); |
printtimeout(); |
goto abort; |
goto abort; |
} |
} |
|
|
pfd[0].events = POLLIN; |
pfd[0].events = POLLIN; |
nfds = poll(pfd, 1, rexmtval * 1000); |
nfds = poll(pfd, 1, rexmtval * 1000); |
if (nfds == 0) { |
if (nfds == 0) { |
timeouts++; |
timeouts += rexmtval; |
continue; |
continue; |
} |
} |
if (nfds == -1) { |
if (nfds == -1) { |
|
|
|
|
/* send ACK to server and wait for server data */ |
/* send ACK to server and wait for server data */ |
for (timeouts = 0, error = 0; !intrflag;) { |
for (timeouts = 0, error = 0; !intrflag;) { |
if (timeouts == maxtimeout) { |
if (timeouts >= maxtimeout) { |
printtimeout(); |
printtimeout(); |
goto abort; |
goto abort; |
} |
} |
|
|
pfd[0].events = POLLIN; |
pfd[0].events = POLLIN; |
nfds = poll(pfd, 1, rexmtval * 1000); |
nfds = poll(pfd, 1, rexmtval * 1000); |
if (nfds == 0) { |
if (nfds == 0) { |
timeouts++; |
timeouts += rexmtval; |
continue; |
continue; |
} |
} |
if (nfds == -1) { |
if (nfds == -1) { |
|
|
} |
} |
if (i == OPT_TIMEOUT) { |
if (i == OPT_TIMEOUT) { |
/* verify OACK response */ |
/* verify OACK response */ |
n = strtonum(value, 1, 255, &errstr); |
n = strtonum(value, TIMEOUT_MIN, TIMEOUT_MAX, |
|
&errstr); |
if (errstr || rexmtval != n || |
if (errstr || rexmtval != n || |
opt_tout == 0) { |
opt_tout == 0) { |
nak(EOPTNEG); |
nak(EOPTNEG); |