Where:
* Under examples and testing
* And the default value is less than 2048
Using a bit more memory for examples and tests should not
be a critical problem.
This commit changes only ones with the default 2048 and
leaves the others.
E.g. this leaves SYSTEM_RAMTEST_STACKSIZE, whose default is 1024.
I guess those need to be inspected one-by-one.
Recent change from Xiao Xiang enabled the SO_REUSEADDR socket option unconditionally. This, of course, causes link time failures if socket options are not enabled:
apps/netutils/telnetd/telnetd_daemon.c:182: undefined reference to 'setsockopt'.
Observed during build testing with configuration rddrone-uavcan144:nsh
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
Check POLLHUP and POLLERR in telnet poll loop
to handle the remote end close correctly
Send "NVT"(network virtual terminal) as the default if getenv("TERM") return NULL
telnet should trigger the error handling if inet_pton return zero
since zero mean the string has format error
Don't return 1 in _environ_telnet to avoid trigger the compression
and remove the redundant TELNET_TELOPT_COMPRESS2 check
Change telnet_error_u to telnet_error_e required by the coding standard
Ensure telnet object get freed before the abnormal exit
The sendmail example hasn't been used in years. I am not sure it was ever debugged. It is so old that it still expects hand editted .config files. As a result, all of the configuration settings were missing from the Kconfig file.
This commit adds the missing apps/examples/sendmail configuration settings so that the example at least builds. I cannot test it because I have no smtp server that I am willing to spam.
This configuration also adds missing configuration dependencies and runs the C files in apps/examples/sendmail and apps/netutils/smtp through nxstyle.
This commit resolves an issue reported by surya prakash rased in the Google group: https://groups.google.com/forum/#!topic/nuttx/idr-M164Y24
apps/netutils/dhcpd/dhcpd.c: Fix unused const variable
dhcpd.c:273:29: warning: 'g_anyipaddr' defined but not used [-Wunused-const-variable=]
static const uint8_t g_anyipaddr[4] = {0, 0, 0, 0};
apps/netutils/dhcpd: Make dhcpd interface configurable
apps/netutils/dhcpd: Lease address directly if hit in address range
apps/netutils/netinit: Initialize dhcpc_state
update the addresses only on request success
NuttX commit 346336bb9e5c9199b82e34d08bf23dd1bc389460 make CONFIG_NET_TCP_READADHEAD unselectable and removed all references to CONFIG_NET_TCP_READHEAD from the the NuttX repositories. However, there was no corresponding removal of CONFIG_NET_TCP_READHEAD from the apps/ repository. As a result, there was logic that depended on the selection of CONFIG_NET_TCP_READHEAD that could never be enabled.
This was found during build testing using the configuration olimex-lpc1766stk/thttpd-binfs. THTTPD was not being build fully because it had dependencies on CONFIG_NET_TCP_READHEAD. There resulted int numerous new warnings and, finally, the error:
(.../apps.examples.thttpd.o): in function `thttp_main':
thttpd_main.c:(.text+0x104): undefined reference to `thttpd_main'
* 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>
1. This fixes the issue reported in Bitbucket apps/ Issue 15. That is, if fopen() fails, the NULL stream handle would be used in subsequent logic. The handling of the failure was incomplete.
2. Some of the error handling was fixed. In the event of an error, it was return return an error value ONLY if we failure to report the error and even then the wrong error would be reported. This change now preserves and returns the correct error number that is the root cause of the failure.
3. Ran the file through tools/nxstyle and cleaned up many formatting problems.
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>
tftpc_get.c: In function 'tftp_write': tftpc_get.c:307:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
int fd = (int)ctx;
^
tftpc_get.c: In function 'tftpget': tftpc_get.c:368:57: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
result = tftpget_cb(remote, addr, binary, tftp_write, (void*)fd);
^
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, ...);
^~~~~~~~