Commit Graph

103 Commits

Author SHA1 Message Date
Xiang Xiao
1ee948e0c8 Include assert.h for DEBUGASSERT caller
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-05-24 12:34:37 +09:00
Juha Niskanen
2a11d60246 netutils/ftpc: fix incorrect comments, nxstyle
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-12-13 11:14:43 -06:00
Juha Niskanen
810398de01 netutils/ftpc: add some error checks
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-12-13 11:14:43 -06:00
Juha Niskanen
4a56546811 netutils/ftpc: add config for using binary type for size command
This is handy for FOTA clients and others that always get binary files.

Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-12-13 11:14:43 -06:00
Juha Niskanen
8f0e872384 netutils/ftpc/ftpc_listdir.c: fix hardfault when issuing 'ls' before 'login'
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-12-13 11:14:43 -06:00
YAMAMOTO Takashi
13424fc404 netutils/ftpc/ftpc_putfile.c: Fix syslog formats 2020-11-24 18:44:23 -08:00
YAMAMOTO Takashi
2a3f2ea8c6 netutils/ftpc/ftpc_putfile.c: Appease nxstyle 2020-11-24 18:44:23 -08:00
YAMAMOTO Takashi
7b3ccfa9da netutils/ftpc/ftpc_getfile.c: Fix a syslog format 2020-11-24 18:44:23 -08:00
YAMAMOTO Takashi
f83caca9ac netutils/ftpc/ftpc_getfile.c: Appease nxstyle 2020-11-24 18:44:23 -08:00
Xiang Xiao
e71e537e24 ftpc_transfer.c:667:15: Fix error: ‘argc’ undeclared
forget in commit efeb1d10b1

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I93a99e909dac57821366f7b522404e673fbcd9d8
2020-08-15 18:19:31 +01:00
Xiang Xiao
efeb1d10b1 netutils/ftpc: Change watchdog callback prototype
follow up the kernel side change

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-08-14 08:20:05 -06:00
Xiang Xiao
ebf37162ed Fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-08-11 12:33:50 -06:00
Xiang Xiao
bf4c36c83f netutils/ftpc: Embed wdog_s in ftpc_session_s directly
follow up the kernel side change

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-08-11 12:33:50 -06:00
Maciej Wójcik
21049ece6e Rewritten READMEs to Markdown 2020-07-25 01:01:51 -07:00
Maciej Wójcik
51e6645f71 Rename README and README.txt to README.md 2020-07-25 01:01:51 -07:00
Xiang Xiao
deaa6c5b7b build: Replace $(TOPDIR)/Make.defs with $(APPDIR)/Make.defs
and move NUTTXLIB defintion to the common place

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-07-09 15:17:37 -03:00
Xiang Xiao
69f013e74e build: Remve the unnecessary .gitignore
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-23 15:56:35 +01:00
Xiang Xiao
ead498a788 build: Remove the workaround for the inexistence of .config/Make.defs
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-21 17:43:42 +01:00
Gregory Nutt
b2d8c501f6 Remove use of set_errno() from application code.
The normal assignment errno = errcode should work fine now.
2020-05-07 22:23:19 +01:00
Xiang Xiao
e72608e0d8 Fix nxstyle issue
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-02 09:45:44 -06:00
Xiang Xiao
1511403fdf Revert "Don't generate .depend anymore"
This reverts commit cc5ad09caa.
2020-03-22 23:09:40 -05:00
Xiang Xiao
cc5ad09caa
Don't generate .depend anymore 2020-03-22 18:15:21 +00:00
Xiang Xiao
41d88f06e7 Run codespell -w with the latest dictonary again 2020-02-23 07:10:14 -06:00
Xiang Xiao
d660492289 Run codespell -w against all files
and fix the wrong correction
2020-02-22 14:41:36 -06:00
Xiang Xiao
e0dcfa0c55 Remove extra whitespace from files (#43)
* Remove multiple newlines at the end of file
* Remove the white space from the end of line
2020-01-31 08:29:24 -06:00
Xiang Xiao
53efd71d6d Fix format warn (#13)
* fix warning: format '%u' expects argument of type 'unsigned int *', but argument 3 has type 'uint16_t *

Change-Id: I3eccf8e2cd917f19b7a9edab233b327297d74bb7
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>

* fix warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'int'

Change-Id: Ic59a1e9e49256637fa73459c46b8cded036cf971
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-14 03:21:13 +01:00
Xiang Xiao
857158451b Unify the void cast usage
1.Remove void cast for function because many place ignore the returned value witout cast
2.Replace void cast for variable with UNUSED macro

Change-Id: Ie644129a563244a6397036789c4c3ea83c4e9b09
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-02 23:21:01 +08:00
Xiang Xiao
3bf17d602e apps/netutils/ftpc: ix the compiler warnings:
ftpc_transfer.c:652:40: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   FAR struct ftpc_session_s *session = (FAR struct ftpc_session_s *)arg1;
                                        ^
ftpc_getreply.c: In function 'fptc_getreply': ftpc_getreply.c:218:58:
warning: passing argument 3 of 'wd_start' from incompatible pointer type [-Wincompatible-pointer-types]
       ret = wd_start(session->wdog, session->replytimeo, ftpc_timeout, 1, session);
                                                          ^~~~~~~~~~~~
 In file included from
/workspace/mirtos/out/sim/miai/mirtos/nuttx/include/nuttx/sched.h:56:0,
                 from /workspace/mirtos/out/sim/miai/mirtos/nuttx/include/sched.h:49,
                 from /workspace/mirtos/out/sim/miai/mirtos/nuttx/include/stdio.h:48,
                 from ftpc_internal.h:48,
                 from ftpc_getreply.c:46: /workspace/mirtos/out/sim/miai/mirtos/nuttx/include/nuttx/wdog.h:247:5: note: expected 'wdentry_t {aka void
(*)(int, long long unsigned int)}' but argument is of type 'void (*)(int, uint32_t) {aka void (*)(int, unsigned int)}'
 int wd_start(WDOG_ID wdog, int32_t delay, wdentry_t wdentry, int argc, ...);
     ^~~~~~~~
2019-12-05 07:11:47 -06:00
Xiang Xiao
7808eb62d2 apps/: In all Make.def files, append to CONFIGURED_APPS patch with the absolute path. 2019-10-17 11:33:59 -06:00
Gregory Nutt
3a23523147 Makefiles: This reverts part of commit cf0365ea9. It restores 'conditional' inclusion of TOPDIR/Make.defs. Otherwise all make targets fail if the board has not been configured. That is okay most of the time, but not for things like clean and distclean which should not depend on being configured. 2019-10-15 09:25:48 +08:00
Xiang Xiao
cf0365ea92 Clean up Makefile under apps folder no functional changes. 2019-10-04 08:35:46 -06:00
Nathan Hartman
664e8a1410 Fix minor typos in docs and comments. 2019-09-29 12:53:39 -06:00
Nathan Hartman
b2a3ba57ff Fix typos 2019-09-11 08:59:08 -06:00
anchao
b5cfd93444 apps/: Modification to build system: Unified application compilation rules 2018-09-03 09:29:56 -06:00
Dmitriy Linikov
1b4d17d9c0 apps/netutils/ftpc: Fixed handling of url-encoded strings 2018-06-04 14:29:35 -06:00
Gregory Nutt
4ad9d7ec19 apps/netutils/ftpc: Fix a typo/compile problem found in build testing. 2018-01-04 18:00:04 -06:00
Gregory Nutt
ccee5daaf3 apps/netutils/ftpc: Fix some cornercases that could cause FTP to access past the end of valid data. 2017-12-21 12:05:28 -06:00
Gregory Nutt
68affc6c08 netutils/ftpc: Eliminate warnings about types of inputs to netlib_ipv4adaptr() and about ftp_cmd_pasv() being defined but not used. 2017-11-12 13:31:36 -06:00
Anthony Merlino
f489bcd6f9 Merged in antmerlino/apps/ftp-ipv6 (pull request #122)
FTP: Adds support for IPv6 and fixes various transfer issues

* netutils/ftpd: Fix support for IPv6 FTP server

* netutils/ftpc:Adds support for IPv6 sockets

* ftpc: Must convert port received by EPSV reply to network order

* ftpc: Data socket address for passive connection should be same as server address

* ftpc: Must skip human readable string in EPSV response before scanning for port

* ftpc: Don't send PASS command if USER command was sufficient. ie no password required

* ftpc: Generically handle permanent negative completion in shard ftpc_cmd logic

* ftpc: Minor addresssing fix

* ftpc: Tweak logic for overriding network debugging output

* FTP: Adds option for setting stack size of various threads in FTPD and FTPC

* netutils/ftpd: Fixes build error setting IPv4 address. sin_addr => sin_addr.s_addr

* netutils/ftpd: Protects against partial write returns by looping in that case

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-11-06 23:41:30 +00:00
Gregory Nutt
8af55bbdcc netutils/ftpc: Fix some crazy comparisons to determine is a file is an absolute path. Noted by Anthony Merlino. 2017-10-13 15:36:36 -06:00
Gregory Nutt
7a8561728c The last change added .PRECIOUS: $(BIN) to everyway Makefile in hopes the libapps.a will not be deleted on Control-C (unproven so far). However, $(BIN) may contain back slashes in some build platforms and that causes problems for make: It can't handle the backslashes in the .PRECIOUS dependency list. $(BIN) replaced with ../../libapp.a, where the number of ../ depends on the depth of the Makefile in the apps/ source tree. 2017-08-13 11:03:17 -06:00
Gregory Nutt
a66da34f18 All Makefiles: Add .PRECIOUS: apps/libapps.a to every Makefile. Hopefully this will end awkward problems when you Control-C out of a build and libapps.a is deleted. 2017-08-13 09:35:14 -06:00
Gregory Nutt
929a86efde netutils/ftpc: Fix warning about free() being implicitly defined 2017-08-12 17:03:18 -06:00
Boris Astardzhiev
158cbeb151 netutils/ftpc: Fix some memory leaks 2017-07-27 07:29:06 -06:00
Gregory Nutt
81645fe18f strcasecmp, strncasecmp, bzero, bcmp, and bcopy should be defined in strings.h, not string.h. bzero, bcmp, and bcopy are legacy functions; the contemporary counterparts should be used instead. 2017-02-16 15:58:15 -06:00
Sebastien Lorquet
2cbad44f1d This is the Pokemon patch to change all includes fronm <apps/bla/bla.h> to "bla/bla.h" 2016-07-11 10:11:18 -06:00
Gregory Nutt
4343a6ef8b Move apps/include/ftpc.h to apps/include/netutils/ftpc.h 2016-07-01 06:36:07 -06:00
Gregory Nutt
d32f16450d Without lowsyslog() *llerr() is not useful. Eliminate and replace with *err(). 2016-06-20 12:39:46 -06:00
Gregory Nutt
a50383db3d apps/graphics and netutils: Change some *err() message to *info() messages if what was a *dbg() message does not indicate and error condition. 2016-06-14 17:53:47 -06:00
Gregory Nutt
a7b1aae68c Fix some warnings 2016-06-13 12:06:44 -06:00