diff options
| author | Craig Rodrigues <rodrigc@FreeBSD.org> | 2011-06-15 22:08:18 +0000 |
|---|---|---|
| committer | Craig Rodrigues <rodrigc@FreeBSD.org> | 2011-06-15 22:08:18 +0000 |
| commit | dc438c8ec893be37c4cb1e59f377bf182b1d1a07 (patch) | |
| tree | 7a2ffef9e79f1d468f4833cb8f95b7787ac2053d /lib/libstand | |
| parent | 6e4c6f18f785b07f74623a9789702d0d5deddbd0 (diff) | |
Notes
Diffstat (limited to 'lib/libstand')
| -rw-r--r-- | lib/libstand/tftp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libstand/tftp.c b/lib/libstand/tftp.c index 5cb876202e80..b8da31a55f4b 100644 --- a/lib/libstand/tftp.c +++ b/lib/libstand/tftp.c @@ -443,11 +443,15 @@ sendrecv_tftp(d, sproc, sbuf, ssize, rproc, rbuf, rsize) continue; } +recvnext: /* Try to get a packet and process it. */ cc = (*rproc)(d, rbuf, rsize, tleft); /* Return on data, EOF or real error. */ if (cc != -1 || errno != 0) return (cc); + if ((getsecs() - t1) < tleft) { + goto recvnext; + } /* Timed out or didn't get the packet we're waiting for */ tleft += MINTMO; |
