Date: Sun, 27 Jun 2010 14:11:03 +0000 (UTC) From: Gavin Atkinson <gavin@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r209550 - head/usr.bin/tftp Message-ID: <201006271411.o5REB39b007381@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006271411.o5REB39b007381>