diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-04-13 16:24:28 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-04-13 16:24:28 -0600 |
commit | 43ec94a665e13552402ff4f102e0f65f6792cf29 (patch) | |
tree | 05da26d1bb5e364c1a388afd54630d5ae3ca4aa7 /apps/netutils/ftpc | |
parent | 70b6bb22af51defd713adfd452309f32f0e523aa (diff) | |
download | px4-nuttx-43ec94a665e13552402ff4f102e0f65f6792cf29.tar.gz px4-nuttx-43ec94a665e13552402ff4f102e0f65f6792cf29.tar.bz2 px4-nuttx-43ec94a665e13552402ff4f102e0f65f6792cf29.zip |
More trailing whilespace removal
Diffstat (limited to 'apps/netutils/ftpc')
-rw-r--r-- | apps/netutils/ftpc/Makefile | 6 | ||||
-rw-r--r-- | apps/netutils/ftpc/ftpc_cdup.c | 2 | ||||
-rw-r--r-- | apps/netutils/ftpc/ftpc_cmd.c | 4 | ||||
-rw-r--r-- | apps/netutils/ftpc/ftpc_getfile.c | 8 | ||||
-rw-r--r-- | apps/netutils/ftpc/ftpc_getreply.c | 8 | ||||
-rw-r--r-- | apps/netutils/ftpc/ftpc_internal.h | 2 | ||||
-rw-r--r-- | apps/netutils/ftpc/ftpc_noop.c | 2 | ||||
-rw-r--r-- | apps/netutils/ftpc/ftpc_putfile.c | 2 | ||||
-rw-r--r-- | apps/netutils/ftpc/ftpc_rename.c | 2 | ||||
-rw-r--r-- | apps/netutils/ftpc/ftpc_rpwd.c | 6 | ||||
-rw-r--r-- | apps/netutils/ftpc/ftpc_socket.c | 6 | ||||
-rw-r--r-- | apps/netutils/ftpc/ftpc_transfer.c | 22 | ||||
-rw-r--r-- | apps/netutils/ftpc/ftpc_utils.c | 2 |
13 files changed, 36 insertions, 36 deletions
diff --git a/apps/netutils/ftpc/Makefile b/apps/netutils/ftpc/Makefile index b610961d8..09ed62cdb 100644 --- a/apps/netutils/ftpc/Makefile +++ b/apps/netutils/ftpc/Makefile @@ -40,11 +40,11 @@ include $(APPDIR)/Make.defs # DHCP Daemn Library ASRCS = -CSRCS = +CSRCS = ifeq ($(CONFIG_NET_TCP),y) # FTP connection management -CSRCS = ftpc_connect.c ftpc_disconnect.c +CSRCS = ftpc_connect.c ftpc_disconnect.c # FTP commands CSRCS += ftpc_cdup.c ftpc_chdir.c ftpc_chmod.c ftpc_filesize.c ftpc_filetime.c @@ -82,7 +82,7 @@ ROOTDEPPATH = --dep-path . # Common build -VPATH = +VPATH = all: .built .PHONY: context depend clean distclean diff --git a/apps/netutils/ftpc/ftpc_cdup.c b/apps/netutils/ftpc/ftpc_cdup.c index d65b5789f..47e9620d9 100644 --- a/apps/netutils/ftpc/ftpc_cdup.c +++ b/apps/netutils/ftpc/ftpc_cdup.c @@ -74,7 +74,7 @@ * Make the parent of the current directory be the new current directory. * ****************************************************************************/ - + int ftpc_cdup(SESSION handle) { FAR struct ftpc_session_s *session = (FAR struct ftpc_session_s *)handle; diff --git a/apps/netutils/ftpc/ftpc_cmd.c b/apps/netutils/ftpc/ftpc_cmd.c index cb1f9e496..11fc90152 100644 --- a/apps/netutils/ftpc/ftpc_cmd.c +++ b/apps/netutils/ftpc/ftpc_cmd.c @@ -133,7 +133,7 @@ int ftpc_cmd(struct ftpc_session_s *session, const char *cmd, ...) int ret; /* Verify that we are still connecte to the server */ - + if (!ftpc_sockconnected(&session->cmd)) { ndbg("Cmd channel si not connected\n"); @@ -169,7 +169,7 @@ int ftpc_cmd(struct ftpc_session_s *session, const char *cmd, ...) } /* Get the response to the command */ - + ret = fptc_getreply(session); if (ret < 0) { diff --git a/apps/netutils/ftpc/ftpc_getfile.c b/apps/netutils/ftpc/ftpc_getfile.c index add07125f..a7c398adf 100644 --- a/apps/netutils/ftpc/ftpc_getfile.c +++ b/apps/netutils/ftpc/ftpc_getfile.c @@ -101,20 +101,20 @@ static int ftpc_recvinit(struct ftpc_session_s *session, FAR const char *path, /* Handle the resume offset (caller is responsible for fseeking in the * file) */ - + if (offset > 0) { /* Send the REST command. This command sets the offset where the * transfer should start. This must come after PORT or PASV commands. */ - + ret = ftpc_cmd(session, "REST %ld", offset); if (ret < 0) { ndbg("REST command failed: %d\n", errno); return ERROR; } - + session->size = offset; } @@ -217,7 +217,7 @@ static int ftpc_recvbinary(FAR struct ftpc_session_s *session, } /* Increment the size of the file written */ - + session->size += nwritten; } } diff --git a/apps/netutils/ftpc/ftpc_getreply.c b/apps/netutils/ftpc/ftpc_getreply.c index 3a9952daf..f07f83f60 100644 --- a/apps/netutils/ftpc/ftpc_getreply.c +++ b/apps/netutils/ftpc/ftpc_getreply.c @@ -137,7 +137,7 @@ static int ftpc_gets(struct ftpc_session_s *session) else if (ch == ISO_cr) { /* What follows the carriage return? */ - + ch = ftpc_sockgetc(&session->cmd); if (ch == '\0') { @@ -184,7 +184,7 @@ static int ftpc_gets(struct ftpc_session_s *session) if (ndx < CONFIG_FTP_MAXREPLY) { /* Yes.. put the character in the reply buffer */ - + session->reply[ndx++] = (char)ch; } else @@ -212,7 +212,7 @@ int fptc_getreply(struct ftpc_session_s *session) int ret; /* Set up a timeout */ - + if (session->replytimeo) { ret = wd_start(session->wdog, session->replytimeo, ftpc_timeout, 1, session); @@ -244,7 +244,7 @@ int fptc_getreply(struct ftpc_session_s *session) return ERROR; } - nvdbg("Reply: %s\n", session->reply); + nvdbg("Reply: %s\n", session->reply); if (session->reply[3] == '-') { diff --git a/apps/netutils/ftpc/ftpc_internal.h b/apps/netutils/ftpc/ftpc_internal.h index 4370f8dab..a2a6fffce 100644 --- a/apps/netutils/ftpc/ftpc_internal.h +++ b/apps/netutils/ftpc/ftpc_internal.h @@ -222,7 +222,7 @@ extern "C" { * Public Functions ****************************************************************************/ /* Low-level string management */ - + EXTERN void ftpc_stripcrlf(FAR char *str); EXTERN void ftpc_stripslash(FAR char *str); EXTERN FAR char *ftpc_dequote(FAR const char *hostname); diff --git a/apps/netutils/ftpc/ftpc_noop.c b/apps/netutils/ftpc/ftpc_noop.c index 6932b1489..5682400dc 100644 --- a/apps/netutils/ftpc/ftpc_noop.c +++ b/apps/netutils/ftpc/ftpc_noop.c @@ -74,7 +74,7 @@ * No operation command. Using NOOP allows us to make sure that commands * are passed over the control connection without changing the status of * any data transaction or server status. This is useful for (1) - * maintaining connections during long IDLE times and (2) It can also be + * maintaining connections during long IDLE times and (2) It can also be * used as a harmless way of detecting timeouts. * ****************************************************************************/ diff --git a/apps/netutils/ftpc/ftpc_putfile.c b/apps/netutils/ftpc/ftpc_putfile.c index d59c4c99e..751597259 100644 --- a/apps/netutils/ftpc/ftpc_putfile.c +++ b/apps/netutils/ftpc/ftpc_putfile.c @@ -321,7 +321,7 @@ static int ftpc_sendfile(struct ftpc_session_s *session, const char *path, * * - "450 Requested file action not taken", "452 - Requested action not * taken" or "553 Requested action not taken" without first responding - * with a mark. + * with a mark. */ /* In active mode, we need to accept a connection on the data socket diff --git a/apps/netutils/ftpc/ftpc_rename.c b/apps/netutils/ftpc/ftpc_rename.c index abda04657..34c067a62 100644 --- a/apps/netutils/ftpc/ftpc_rename.c +++ b/apps/netutils/ftpc/ftpc_rename.c @@ -109,7 +109,7 @@ int ftpc_rename(SESSION handle, FAR const char *oldname, FAR const char *newname newcopy = strdup(newname); ftpc_stripslash(newcopy); - + /* A RNTO request asks the server to finish renaming a file. RNTO must * come immediately after RNFR; otherwise the server may reject RNTO with: * diff --git a/apps/netutils/ftpc/ftpc_rpwd.c b/apps/netutils/ftpc/ftpc_rpwd.c index ed60cfeb0..91dd1504f 100644 --- a/apps/netutils/ftpc/ftpc_rpwd.c +++ b/apps/netutils/ftpc/ftpc_rpwd.c @@ -105,7 +105,7 @@ FAR char *ftpc_rpwd(SESSION handle) return NULL; } start++; - + end = strchr(start, '\"'); if (!end) { @@ -120,7 +120,7 @@ FAR char *ftpc_rpwd(SESSION handle) * * len = end - start + 1 = 11 (+ NUL terminator) */ - + len = end - start + 1; pwd = (char *)malloc(len + 1); if (!pwd) @@ -128,7 +128,7 @@ FAR char *ftpc_rpwd(SESSION handle) ndbg("Failed to allocate string\n"); return NULL; } - + /* Copy the string into the allocated memory */ memcpy(pwd, start, len); diff --git a/apps/netutils/ftpc/ftpc_socket.c b/apps/netutils/ftpc/ftpc_socket.c index f904688fd..b2e76b44b 100644 --- a/apps/netutils/ftpc/ftpc_socket.c +++ b/apps/netutils/ftpc/ftpc_socket.c @@ -210,14 +210,14 @@ void ftpc_sockcopy(FAR struct ftpc_socket_s *dest, * * Description: * Accept a connection on the data socket. This function is onlly used - * in active mode. + * in active mode. * * In active mode FTP the client connects from a random port (N>1023) to the * FTP server's command port, port 21. Then, the client starts listening to * port N+1 and sends the FTP command PORT N+1 to the FTP server. The server * will then connect back to the client's specified data port from its local * data port, which is port 20. In passive mode FTP the client initiates - * both connections to the server, solving the problem of firewalls filtering + * both connections to the server, solving the problem of firewalls filtering * the incoming data port connection to the client from the server. When * opening an FTP connection, the client opens two random ports locally * (N>1023 and N+1). The first port contacts the server on port 21, but @@ -225,7 +225,7 @@ void ftpc_sockcopy(FAR struct ftpc_socket_s *dest, * back to its data port, the client will issue the PASV command. The result * of this is that the server then opens a random unprivileged port (P > * 1023) and sends the PORT P command back to the client. The client then - * initiates the connection from port N+1 to port P on the server to transfer + * initiates the connection from port N+1 to port P on the server to transfer * data. * ****************************************************************************/ diff --git a/apps/netutils/ftpc/ftpc_transfer.c b/apps/netutils/ftpc/ftpc_transfer.c index 46ec88ec9..e26d7e87b 100644 --- a/apps/netutils/ftpc/ftpc_transfer.c +++ b/apps/netutils/ftpc/ftpc_transfer.c @@ -85,7 +85,7 @@ * port N+1 and sends the FTP command PORT N+1 to the FTP server. The server * will then connect back to the client's specified data port from its local * data port, which is port 20. In passive mode FTP the client initiates - * both connections to the server, solving the problem of firewalls filtering + * both connections to the server, solving the problem of firewalls filtering * the incoming data port connection to the client from the server. When * opening an FTP connection, the client opens two random ports locally * (N>1023 and N+1). The first port contacts the server on port 21, but @@ -93,7 +93,7 @@ * back to its data port, the client will issue the PASV command. The result * of this is that the server then opens a random unprivileged port (P > * 1023) and sends the PORT P command back to the client. The client then - * initiates the connection from port N+1 to port P on the server to transfer + * initiates the connection from port N+1 to port P on the server to transfer * data. * ****************************************************************************/ @@ -137,7 +137,7 @@ static int ftp_pasvmode(struct ftpc_session_s *session, /* The response is then 6 integer values: four representing the * IP address and two representing the port number. */ - + nscan = sscanf(ptr, "%d,%d,%d,%d,%d,%d", &tmpap[0], &tmpap[1], &tmpap[2], &tmpap[3], &tmpap[4], &tmpap[5]); @@ -149,7 +149,7 @@ static int ftp_pasvmode(struct ftpc_session_s *session, /* Then copy the sscanf'ed values as bytes */ - + for (i = 0; i < 6; i++) { addrport[i] = (uint8_t)(tmpap[i] & 0xff); @@ -185,7 +185,7 @@ static FAR char *ftpc_abspath(FAR struct ftpc_session_s *session, if (relpath[0] == '~') { /* Is the relative path only '~' */ - + if (relpath[1] == '\0') { return strdup(homedir); @@ -209,7 +209,7 @@ static FAR char *ftpc_abspath(FAR struct ftpc_session_s *session, /* No tilde expansion. Check for a path relative to the current * directory. */ - + else if (strncmp(relpath, "./", 2) == 0) { ret = asprintf(&ptr, "%s%s", curdir, relpath+1); @@ -278,7 +278,7 @@ int ftpc_xfrinit(FAR struct ftpc_session_s *session) if (FTPC_IS_PASSIVE(session)) { /* Yes.. going passive. */ - + ret = ftp_pasvmode(session, addrport); if (ret != OK) { @@ -370,7 +370,7 @@ int ftpc_xfrmode(struct ftpc_session_s *session, uint8_t xfrmode) * * The server accepts the TYPE request with code 200. */ - + ret = ftpc_cmd(session, "TYPE %c", xfrmode == FTPC_XFRMODE_ASCII ? 'A' : 'I'); session->xfrmode = xfrmode; } @@ -405,7 +405,7 @@ int ftpc_xfrabort(FAR struct ftpc_session_s *session, FAR FILE *stream) if (ret > 0) { /* Read data from command channel */ - + nvdbg("Flush cmd channel data\n"); while (stream && fread(session->buffer, 1, CONFIG_FTP_BUFSIZE, stream) > 0); return OK; @@ -428,7 +428,7 @@ int ftpc_xfrabort(FAR struct ftpc_session_s *session, FAR FILE *stream) while (stream && fread(session->buffer, 1, CONFIG_FTP_BUFSIZE, stream) > 0); /* Get the ABORt reply */ - + fptc_getreply(session); /* Expected replys are: "226 Closing data connection" or @@ -448,7 +448,7 @@ int ftpc_xfrabort(FAR struct ftpc_session_s *session, FAR FILE *stream) /* Expected replys are: or "225 Data connection open; no transfer in progress" * "226 Closing data connection" */ - + if (session->code != 226 && session->code != 225) { nvdbg("Expected 225 or 226 reply\n"); diff --git a/apps/netutils/ftpc/ftpc_utils.c b/apps/netutils/ftpc/ftpc_utils.c index 50b1a6e4e..ef67c1f05 100644 --- a/apps/netutils/ftpc/ftpc_utils.c +++ b/apps/netutils/ftpc/ftpc_utils.c @@ -226,7 +226,7 @@ FAR char *ftpc_dequote(FAR const char *str) if (allocstr) { /* Search the string */ - + ptr = allocstr; while (*str) { |