From ead92a8517326ce59ff21ee9934680a6bc67544b Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 1 Jun 2011 23:33:39 +0000 Subject: [PATCH] Fix some FTP compile errors when debug is on git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3657 42af7a65-404d-4744-a932-0658087f49c3 --- netutils/ftpc/ftpc_cmd.c | 5 +++-- netutils/ftpc/ftpc_connect.c | 6 +++--- netutils/ftpc/ftpc_listdir.c | 1 + netutils/ftpc/ftpc_putfile.c | 3 ++- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/netutils/ftpc/ftpc_cmd.c b/netutils/ftpc/ftpc_cmd.c index 240a513e8..277899433 100644 --- a/netutils/ftpc/ftpc_cmd.c +++ b/netutils/ftpc/ftpc_cmd.c @@ -41,6 +41,7 @@ #include #include +#include #include #include "ftpc_internal.h" @@ -163,7 +164,7 @@ int ftpc_cmd(struct ftpc_session_s *session, const char *cmd, ...) if (ret < 0) { - ndbg("Error sending cmd: %s, %d\n" cmd, errno); + ndbg("Error sending cmd %s: %d\n", cmd, errno); goto errout; } @@ -172,7 +173,7 @@ int ftpc_cmd(struct ftpc_session_s *session, const char *cmd, ...) ret = fptc_getreply(session); if (ret < 0) { - ndbg("Error getting reply: %d\n" errno); + ndbg("Error getting reply: %d\n", errno); goto errout; } diff --git a/netutils/ftpc/ftpc_connect.c b/netutils/ftpc/ftpc_connect.c index b0a5919df..a61ca2d02 100644 --- a/netutils/ftpc/ftpc_connect.c +++ b/netutils/ftpc/ftpc_connect.c @@ -166,7 +166,7 @@ int ftpc_reconnect(FAR struct ftpc_session_s *session) #ifdef CONFIG_DEBUG tmp = inet_ntoa(session->addr); ndbg("Connecting to server address %s:%d\n", - server->proxy ? "proxy" : "server", tmp, ntohl(session->port)); + tmp, ntohl(session->port)); free(tmp); #endif @@ -212,10 +212,10 @@ int ftpc_reconnect(FAR struct ftpc_session_s *session) #ifdef CONFIG_DEBUG ndbg("Connected\n"); - tmp = inet_ntoa(session->cmd.raddr.sin_addr.s_addr); + tmp = inet_ntoa(session->cmd.raddr.sin_addr); ndbg(" Remote address: %s:%d\n", tmp, ntohl(session->cmd.raddr.sin_port)); free(tmp); - tmp = inet_ntoa(session->cmd.laddr.sin_addr.s_addr); + tmp = inet_ntoa(session->cmd.laddr.sin_addr); ndbg(" Local address: %s:d\n", tmp, ntohl(session->cmd.laddr.sin_port)); free(tmp); #endif diff --git a/netutils/ftpc/ftpc_listdir.c b/netutils/ftpc/ftpc_listdir.c index 09fad57ff..e58b874e7 100644 --- a/netutils/ftpc/ftpc_listdir.c +++ b/netutils/ftpc/ftpc_listdir.c @@ -44,6 +44,7 @@ #include #include #include +#include #include #include diff --git a/netutils/ftpc/ftpc_putfile.c b/netutils/ftpc/ftpc_putfile.c index 6993169d9..ec70e58df 100644 --- a/netutils/ftpc/ftpc_putfile.c +++ b/netutils/ftpc/ftpc_putfile.c @@ -44,6 +44,7 @@ #include #include #include +#include #include #include @@ -398,7 +399,7 @@ int ftp_putfile(SESSION handle, const char *lname, const char *rname, ret = fseek(finstream, session->offset, SEEK_SET); if (ret != OK) { - ndbg("fseek failed: %d\n", errnoo); + ndbg("fseek failed: %d\n", errno); fclose(finstream); return ERROR; }