summaryrefslogtreecommitdiff
path: root/apps/netutils/ftpc/ftpc_connect.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-06-03 20:27:30 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-06-03 20:27:30 +0000
commit92fd8f5221ca528c2def13897c712d558adf1675 (patch)
tree0c9d63fe3408864b46597a4eb1c20eace2ffc783 /apps/netutils/ftpc/ftpc_connect.c
parent90e92459a9c7a33fb8a005f87ec3f512b760c487 (diff)
downloadnuttx-92fd8f5221ca528c2def13897c712d558adf1675.tar.gz
nuttx-92fd8f5221ca528c2def13897c712d558adf1675.tar.bz2
nuttx-92fd8f5221ca528c2def13897c712d558adf1675.zip
More FTP bugfixes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3665 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/netutils/ftpc/ftpc_connect.c')
-rw-r--r--apps/netutils/ftpc/ftpc_connect.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/netutils/ftpc/ftpc_connect.c b/apps/netutils/ftpc/ftpc_connect.c
index 3af6ef65f..8affbdade 100644
--- a/apps/netutils/ftpc/ftpc_connect.c
+++ b/apps/netutils/ftpc/ftpc_connect.c
@@ -41,6 +41,7 @@
#include <stdlib.h>
#include <unistd.h>
+#include <string.h>
#include <errno.h>
#include <debug.h>
@@ -114,6 +115,15 @@ SESSION ftpc_connect(FAR struct ftpc_connect_s *server)
session->port = htons(server->port);
}
+ /* Get the local home directory, i.e., the value of the PWD environment
+ * variable at the time of the connection. We keep a local copy so that
+ * we can change the current working directory without effecting any other
+ * logic that may be in same context.
+ */
+
+ session->homeldir = strdup(ftpc_lpwd());
+/* session->curldir = strdup(sssion->homeldir); */
+
/* Create up a timer to prevent hangs */
session->wdog = wd_create();