update ftpclient
This commit is contained in:
parent
4d938bc81d
commit
ffbf276607
|
@ -218,8 +218,7 @@ int Download(char *name)
|
|||
printf("creating file %s ....\r\n",name);
|
||||
int file=open(name,O_RDWR | O_CREAT);
|
||||
if(file > 0){
|
||||
ret = write(file,buf,strlen(buf));
|
||||
printf("%d\n",ret);
|
||||
ret = PrivWrite(file,buf,strlen(buf));
|
||||
if(ret < 0 ){
|
||||
printf("write failed\r\n");
|
||||
}
|
||||
|
@ -236,14 +235,10 @@ int Download(char *name)
|
|||
|
||||
int TestFtp()
|
||||
{
|
||||
|
||||
lwip_config_tcp(0, tcp_demo_ipaddr, tcp_demo_netmask, tcp_demo_gwaddr);
|
||||
|
||||
cmd_fd = socket(AF_INET, SOCK_STREAM, 0);
|
||||
|
||||
uint8_t ip[4] = { 192,168,130,70 };
|
||||
Login(ip,21,"frank","114514");
|
||||
|
||||
Download("File0.txt");
|
||||
Download("File1.txt");
|
||||
Download("File2.txt");
|
||||
|
|
Loading…
Reference in New Issue