Fix more FTP bugs
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3664 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
72b70475b5
commit
a94c011b4e
@ -74,7 +74,8 @@
|
||||
* Name: ftpc_filetime
|
||||
*
|
||||
* Descripton:
|
||||
* Return the timestamp on the remote file.
|
||||
* Return the timestamp on the remote file. Returned time is UTC
|
||||
* (Universal Coordinated Time).
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
|
@ -113,9 +113,15 @@ FAR char *ftpc_pwd(SESSION handle)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Allocate memory for the path name */
|
||||
/* Allocate memory for the path name:
|
||||
*
|
||||
* Reply: 257 "/home/gnutt"
|
||||
* ^start ^end
|
||||
*
|
||||
* len = end - start + 1 = 11 (+ NUL terminator)
|
||||
*/
|
||||
|
||||
len = end - start;
|
||||
len = end - start + 1;
|
||||
pwd = (char *)malloc(len + 1);
|
||||
if (!pwd)
|
||||
{
|
||||
|
@ -182,7 +182,7 @@ void ftpc_stripslash(FAR char *str)
|
||||
if (len > 1)
|
||||
{
|
||||
ptr = str + len - 1;
|
||||
if (*ptr == '/');
|
||||
if (*ptr == '/')
|
||||
{
|
||||
*ptr = '\0';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user