The following errors are false positives.
https://github.com/apache/incubator-nuttx/issues/387
```
/Users/yamamoto/git/nuttx/apps/netutils/netlib/netlib_parseurl.c:57:13: error: C++ style comment
/Users/yamamoto/git/nuttx/apps/netutils/netlib/netlib_parseurl.c:59:35: error: C++ style comment
```
Summary:
- This commit fixes the renew command with the usrsock
Impact:
- None
Testing:
- Tested with spresense:wifi and esp32-devkitc:wapi
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
It's used in the code but missing in Kconfig.
I guess the PR [1] forgot to add this.
Make it "y" by default because it seems like the original behavior
before the PR [1]. I have no strong opinions on the default
either ways.
[1] https://github.com/apache/incubator-nuttx-apps/pull/570
from:
return - ECONNABORTED;
to:
return -ECONNABORTED;
The latter style is more commonly used within NuttX code base.
Note: nxstyle doesn't complain on either of them.
The current calculation easily overflows if the local time is
around the unix epoch. I guess it isn't too unusual for
devices without RTC. Or, the battery is dead. Or, whatever.
This commit avoids the overflow by simply dividing everything by 2.
While more sophisticated and precise solutions are possible,
I feel that they are overkill for this simple implementation.
For example,
The unix epoch (1970) is 0x83aa7e8000000000 in
64-bit NTP timestamp. (1900-origin)
The timestamp now, as of writing this, is 0xe3cda16b00000000.
With the code before this commit, the offset will be:
(lldb) p (long long)((0xe3cda16b00000000 - 0x83aa7e8000000000) + (0xe3cda16b00000000 - 0x83aa7e8000000000)) / 2
(long long) $16 = -2295952992316162048
(lldb)
with the new code, it would be:
(lldb) p (long long)((0xe3cda16b00000000 / 2 - 0x83aa7e8000000000 / 2) + (0xe3cda16b00000 / 2 - 0x83aa7e8000000000 / 2))
(long long) $17 = 6927419044538613760
(lldb)
It's the correct offset from the unix epoch:
(lldb) p 6927419044538613760 >> 32
(long) $0 = 1612915435
(lldb)
spacetanuki% date -r 1612915435
Wed Feb 10 09:03:55 JST 2021
spacetanuki%
Summary:
- I noticed that lc823450-xgevk:rndis does not work with iperf
- Finally, I found that it does not call pthread_join()
- This commit fixes this issue
Impact:
- No impact
Testing:
- Tested with lc823450-xgevk:rndis
- NOTE: need to add iperf in the defconfig
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
The buffer doesn't have the space for the terminating NUL.
Fix it by replacing it with fwrite, as there seems to be little reason
to use fprintf and NUL-terminated string in the first place.
Allow multiple NTP servers, also with runtime configurable list
Add validation of received NTP packets
NTPv4 support with 'Kiss o' Death' message handling
IPv6 support
Collect multiple NTP samples and filter outsiders
Check if system clock has been altered during NTP (if CONFIG_CLOCK_MONOTONIC)
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
This happened frequently for me with Docker Desktop's
/var/run/docker.sock on macOS.
But I believe it can happen on other environments, even with TCP.
Alternatively, this case can be handled by the callback
implementations. But it's simpler to handle the corner case here.
Summary:
- This commit fixes compile warnings with Arm GCC 9.3.1
Impact:
- None
Testing:
- Tested with lm3s6965-ek:discover
- NOTE: need to add the following configs
+CONFIG_EXAMPLES_IPERF=y
+CONFIG_EXAMPLES_IPERFTEST_DEVNAME="eth0"
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
* It doesn't make much sense to have the default values for
these highly environment-dependent settings.
* netutils/netinit/netinit_associate.c calls wpa_driver_wext_associate
if the SSID is not empty. Depending on the environment, it can take
long to fail. It slows down the boot of some configurations
considerably. eg. esp32-devkitc:wapi
wget is missing from some system (like macOS and Windows native),
it's better to use curl to simplify build environment.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
The following nxstyle error is intentionally left.
It's a nested function. I guess nxstyle doesn't support it.
netutils/chat/chat.c:110:8: error: Bad comment alignment
The following nxstyle errors are intentionally left.
The first one is in the copyright notice.
The others are identifiers like ClientData etc.
netutils/thttpd/thttpd.c:10:81: error: Long line found
netutils/thttpd/thttpd.c:99:2: error: Mixed case identifier found
netutils/thttpd/thttpd.c💯2: error: Mixed case identifier found
netutils/thttpd/thttpd.c:131:17: error: Mixed case identifier found
netutils/thttpd/thttpd.c:131:57: error: Mixed case identifier found
netutils/thttpd/thttpd.c:132:36: error: Mixed case identifier found
netutils/thttpd/thttpd.c:133:52: error: Mixed case identifier found
netutils/thttpd/thttpd.c:134:23: error: Mixed case identifier found
netutils/thttpd/thttpd.c:134:63: error: Mixed case identifier found
netutils/thttpd/thttpd.c:527:2: error: Mixed case identifier found
netutils/thttpd/thttpd.c:597:17: error: Mixed case identifier found
netutils/thttpd/thttpd.c:597:57: error: Mixed case identifier found
netutils/thttpd/thttpd.c:608:14: error: Mixed case identifier found
netutils/thttpd/thttpd.c:615:38: error: Mixed case identifier found
netutils/thttpd/thttpd.c:620:14: error: Mixed case identifier found
netutils/thttpd/thttpd.c:625:37: error: Mixed case identifier found
netutils/thttpd/thttpd.c:632:36: error: Mixed case identifier found
netutils/thttpd/thttpd.c:633:52: error: Mixed case identifier found
netutils/thttpd/thttpd.c:643:23: error: Mixed case identifier found
netutils/thttpd/thttpd.c:643:63: error: Mixed case identifier found
netutils/thttpd/thttpd.c:730:35: error: Mixed case identifier found
netutils/thttpd/thttpd.c:739:29: error: Mixed case identifier found
This fixes the case when webclient_set_static_body is used
for data larger than webclient_context::buflen.
Note: as of writing this, webclient_set_static_body is the
only user of body_callback in NuttX apps tree.
Uses logic from apps/fsutils/ipcfg to obtain the IP address configuration from a file, if available. This only effects the behavior of netinit if CONFIG_FSUTILS_IPCFG is selected and if an IP configuration file is available on a file system. Otherwise, it reverts to the preceding behavior.
Also adds definitions to apps/include/fsutils/ipcfg.h to formalize a bit encoding of the prototype which was already in use, but not documented.
Also fixes some bad assertions (duplication of PR #420) and makes use of variable names consistent in ipcfg.h comments and in ipcfg_text implementation.
Highlights:
* TLS support (a hook to allow users to provide TLS implementation)
* ability to add extra request headers
* ability to use PUT method
* ability to report http status
* error handling improvements
Proposed on the ML while ago:
https://www.mail-archive.com/dev@nuttx.apache.org/msg03803.html
The original API is kept for now.
I plan to remove them after adapting the existing users.
(examples in this repo)
Summary:
- dhcpc now uses gethostname() but the hostname might be empty
- This commit fixes this issue
Impact:
- All use cases which use dhcpc
Testing:
- Tested with spresense:wifi
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>