Add get and put commands to NSH

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@880 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2008-09-06 00:16:09 +00:00
parent ab543364bd
commit b7d9a67870
9 changed files with 390 additions and 51 deletions
+1 -1
View File
@@ -323,7 +323,7 @@ int tftpget(const char *remote, const char *local, in_addr_t addr, boolean binar
*/
#if CONFIG_NETUTILS_TFTP_ACKPACKETS > 1
if (ndatabytes < blockno != lastacked)
if (ndatabytes < TFTP_DATASIZE && blockno != lastacked)
{
len = tftp_mkackpacket(packet, blockno);
ret = tftp_sendto(sd, packet, len, &server);
+1 -2
View File
@@ -402,7 +402,7 @@ int tftpput(const char *local, const char *remote, in_addr_t addr, boolean binar
#if CONFIG_NETUTILS_TFTP_ACKPACKETS > 1
/* Construct the next data packet */
packetlen = tftp_mkdatapacket(fd, offset[tail], packet, blockno);
packetlen = tftp_mkdatapacket(fd, offsets[tail], packet, blockno);
if (packetlen < 0)
{
goto errout_with_sd;
@@ -474,7 +474,6 @@ int tftpput(const char *local, const char *remote, in_addr_t addr, boolean binar
#if CONFIG_NETUTILS_TFTP_ACKPACKETS > 1
if (blockno - hblockno >= CONFIG_NETUTILS_TFTP_ACKPACKETS || eof)
{
uint16 rblockno;
int ndx;
/* Get the next ACK from the wire */