This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Re: tftp_server sends entire buffer not just data.
- From: Andrew Lunn <andrew dot lunn at ascom dot ch>
- To: Bob Holmberg <bob_holmberg at yahoo dot com>
- Cc: ecos-patches at sources dot redhat dot com
- Date: Wed, 14 May 2003 09:01:00 +0200
- Subject: Re: tftp_server sends entire buffer not just data.
- References: <20030513191541.12426.qmail@web14001.mail.yahoo.com>
On Tue, May 13, 2003 at 12:15:41PM -0700, Bob Holmberg wrote:
> When retrieving a file from the TFTP_Server
> "packages/net/common/current/src/tftp_server.c"
> using the "tftp_dummy_file.c" file system, the
> retrieved file was always the size of the buffer,
> not truncated to the size of the data in the file.
>
> Cause: server opens a file to read in WRONLY mode.
> fix: open file to read in RDONLY mode instead.
Duh! Cut and paste error on my part!
Committed. Please inclulde a ChangeFile entry next time. I wrote one:
2003-05-14 Bob Holmberg <bob_holmberg@yahoo.com>
* src/tftp_server.c (tftpd_read_file): Open the file for reading,
not writing.
Andrew