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
This commit is contained in:
parent
c4b747f9f9
commit
ead92a8517
@ -41,6 +41,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -44,6 +44,7 @@
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <libgen.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <apps/ftpc.h>
|
||||
|
@ -44,6 +44,7 @@
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <libgen.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <apps/ftpc.h>
|
||||
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user