svn commit: r209550 - head/usr.bin/tftp
Gavin Atkinson
gavin at FreeBSD.org
Sun Jun 27 14:11:03 UTC 2010
Author: gavin
Date: Sun Jun 27 14:11:03 2010
New Revision: 209550
URL: http://svn.freebsd.org/changeset/base/209550
Log:
Fix core dump when server fails to respond.
Reviewed by: imp
Modified:
head/usr.bin/tftp/tftp.c
Modified: head/usr.bin/tftp/tftp.c
==============================================================================
--- head/usr.bin/tftp/tftp.c Sun Jun 27 12:19:09 2010 (r209549)
+++ head/usr.bin/tftp/tftp.c Sun Jun 27 14:11:03 2010 (r209550)
@@ -229,7 +229,10 @@ recvfile(int peer, char *port, int fd, c
/* 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;
More information about the svn-src-all
mailing list