summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tftp/tftp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/tftp/tftp.c b/usr.bin/tftp/tftp.c
index 29ba2b2..c6e1118 100644
--- a/usr.bin/tftp/tftp.c
+++ b/usr.bin/tftp/tftp.c
@@ -229,7 +229,10 @@ recvfile(int peer, char *port, int fd, char *name, char *mode)
/* Otherwise it is a fatal error */
break;
}
-
+ if (i == 12) {
+ printf("Transfer timed out.\n");
+ return;
+ }
if (rp->th_opcode == ERROR) {
tftp_log(LOG_ERR, "Error code %d: %s", rp->th_code, rp->th_msg);
return;
OpenPOWER on IntegriCloud