Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2003-07-30 11:16:39 +0400
committerEric Andersen <andersen@codepoet.org>2003-07-30 11:16:39 +0400
commitb99aec0ba5b5b5f7f565c89bb0dab158d7342fee (patch)
tree87009d84b46a258338a08c43b109210f8a4f365b /networking/tftp.c
parentd8ceba959a9e8c6a62b20080bb745776e1644fb8 (diff)
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,
}
- if (finished) {
+ if (finished && (opcode == TFTP_ACK)) {
break;
}
@@ -346,11 +346,10 @@ static inline int tftp(const int cmd, const struct hostent *host,
case 0:
bb_error_msg("timeout");
+ timeout--;
if (timeout == 0) {
len = -1;
bb_error_msg("last timeout");
- } else {
- timeout--;
}
break;