summaryrefslogtreecommitdiff
path: root/networking/tftp.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2003-07-30 07:16:39 +0000
committerEric Andersen <andersen@codepoet.org>2003-07-30 07:16:39 +0000
commitb99aec0ba5b5b5f7f565c89bb0dab158d7342fee (patch)
tree87009d84b46a258338a08c43b109210f8a4f365b /networking/tftp.c
parentd8ceba959a9e8c6a62b20080bb745776e1644fb8 (diff)
downloadbusybox-w32-b99aec0ba5b5b5f7f565c89bb0dab158d7342fee.tar.gz
busybox-w32-b99aec0ba5b5b5f7f565c89bb0dab158d7342fee.tar.bz2
busybox-w32-b99aec0ba5b5b5f7f565c89bb0dab158d7342fee.zip
Christian Meyer provided this patch to fix more bugs with the tftp client
Diffstat (limited to 'networking/tftp.c')
-rw-r--r--networking/tftp.c5
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