projects
/
oweals
/
nmrpflash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ccd4b02
)
Extend blind mode to TFTP
author
Joseph C. Lehner
<joseph.c.lehner@gmail.com>
Sun, 1 Mar 2020 20:55:59 +0000
(21:55 +0100)
committer
Joseph C. Lehner
<joseph.c.lehner@gmail.com>
Sun, 1 Mar 2020 20:57:24 +0000
(21:57 +0100)
tftp.c
patch
|
blob
|
history
diff --git
a/tftp.c
b/tftp.c
index 27ca32062ec92fd54c330665793991a8aa74ae25..b6f5ce7a5690a1d6c8a567a9360dbb06033f48e1 100644
(file)
--- a/
tftp.c
+++ b/
tftp.c
@@
-453,6
+453,12
@@
int tftp_put(struct nmrpd_args *args)
} else if (!ret) {
if (++timeouts < 5 || (!block && timeouts < 10)) {
continue;
+ } else if (args->blind) {
+ timeouts = 0;
+ // fake an ACK packet
+ pkt_mknum(rx, ACK);
+ pkt_mknum(rx + 2, block);
+ continue;
} else if (block) {
fprintf(stderr, "Timeout while waiting for ACK(%d).\n", block);
} else {