summaryrefslogtreecommitdiff
path: root/apps/netutils/ftpc/ftpc_getfile.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-06-05 16:13:50 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-06-05 16:13:50 +0000
commitd6e0fecec1f8b8bfa14784fa2a33f5f4da66148e (patch)
tree7f58b3685481214d1ccecd7080f0872fb5deec3b /apps/netutils/ftpc/ftpc_getfile.c
parentab784567291b1925d616ea9b9d2577f42d2699a5 (diff)
downloadnuttx-d6e0fecec1f8b8bfa14784fa2a33f5f4da66148e.tar.gz
nuttx-d6e0fecec1f8b8bfa14784fa2a33f5f4da66148e.tar.bz2
nuttx-d6e0fecec1f8b8bfa14784fa2a33f5f4da66148e.zip
Fix a bug in recvfrom()
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3670 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/netutils/ftpc/ftpc_getfile.c')
-rw-r--r--apps/netutils/ftpc/ftpc_getfile.c44
1 files changed, 0 insertions, 44 deletions
diff --git a/apps/netutils/ftpc/ftpc_getfile.c b/apps/netutils/ftpc/ftpc_getfile.c
index 8a60c514b..366351636 100644
--- a/apps/netutils/ftpc/ftpc_getfile.c
+++ b/apps/netutils/ftpc/ftpc_getfile.c
@@ -167,31 +167,6 @@ static int ftpc_recvinit(struct ftpc_session_s *session, FAR const char *path,
}
/****************************************************************************
- * Name: ftpc_waitinput
- *
- * Description:
- * Wait to receive data.
- *
- ****************************************************************************/
-
-static int ftpc_waitinput(FAR struct ftpc_session_s *session)
-{
- int ret;
- do {
- ret = ftpc_waitdata(session, session->data.instream, true);
- if (ret == -1) {
- if (errno == EINTR)
- {
- FTPC_SET_INTERRUPT(session);
- }
- return ERROR;
- }
- } while(ret == 0);
-
- return OK;
-}
-
-/****************************************************************************
* Name: ftpc_recvbinary
*
* Description:
@@ -219,16 +194,6 @@ static int ftpc_recvbinary(FAR struct ftpc_session_s *session,
for (;;)
{
- /* Wait for input on the socket */
-
- ret = ftpc_waitinput(session);
- if (ret != OK)
- {
- nvdbg("ftpc_waitinput() failed\n");
- err = EIO;
- goto errout_with_buf;
- }
-
/* Read the data from the socket */
nread = fread(buf, sizeof(char), CONFIG_FTP_BUFSIZE, rinstream);
@@ -451,15 +416,6 @@ int ftpc_recvtext(FAR struct ftpc_session_s *session,
while ((ch = fgetc(rinstream)) != EOF)
{
- /* Wait for input on the socket */
-
- ret = ftpc_waitinput(session);
- if (ret != OK)
- {
- nvdbg("ftpc_waitinput() failed\n");
- break;
- }
-
/* Is it a carriage return? Compress \r\n to \n */
if (ch == '\r')