diff options
author | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2003-07-30 07:16:39 +0000 |
---|---|---|
committer | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2003-07-30 07:16:39 +0000 |
commit | 2301f6da5c26b7223dbd3228f2a3f43bdde3db94 (patch) | |
tree | 87009d84b46a258338a08c43b109210f8a4f365b | |
parent | 8b98e94671816dba72f3144d50143e3bba4ae3fb (diff) | |
download | busybox-w32-2301f6da5c26b7223dbd3228f2a3f43bdde3db94.tar.gz busybox-w32-2301f6da5c26b7223dbd3228f2a3f43bdde3db94.tar.bz2 busybox-w32-2301f6da5c26b7223dbd3228f2a3f43bdde3db94.zip |
Christian Meyer provided this patch to fix more bugs with the tftp client
git-svn-id: svn://busybox.net/trunk/busybox@7136 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r-- | networking/tftp.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/networking/tftp.c b/networking/tftp.c index da44284dc..a1a79a09c 100644 --- a/networking/tftp.c +++ b/networking/tftp.c | |||
@@ -305,7 +305,7 @@ static inline int tftp(const int cmd, const struct hostent *host, | |||
305 | } | 305 | } |
306 | 306 | ||
307 | 307 | ||
308 | if (finished) { | 308 | if (finished && (opcode == TFTP_ACK)) { |
309 | break; | 309 | break; |
310 | } | 310 | } |
311 | 311 | ||
@@ -346,11 +346,10 @@ static inline int tftp(const int cmd, const struct hostent *host, | |||
346 | case 0: | 346 | case 0: |
347 | bb_error_msg("timeout"); | 347 | bb_error_msg("timeout"); |
348 | 348 | ||
349 | timeout--; | ||
349 | if (timeout == 0) { | 350 | if (timeout == 0) { |
350 | len = -1; | 351 | len = -1; |
351 | bb_error_msg("last timeout"); | 352 | bb_error_msg("last timeout"); |
352 | } else { | ||
353 | timeout--; | ||
354 | } | 353 | } |
355 | break; | 354 | break; |
356 | 355 | ||