Extend blind mode to TFTP
This commit is contained in:
parent
ccd4b0204b
commit
ddebe8979e
1 changed files with 6 additions and 0 deletions
6
tftp.c
6
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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue