Commit Graph

443 Commits

Author SHA1 Message Date
Juha Niskanen
2aabd1c9a7 webclient: run through nxstyle
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-04-23 09:29:36 -06:00
Juha Niskanen
f8f16975a9 webclient: use getaddrinfo to get IPv4 addresses on dual stack systems
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-04-23 09:29:36 -06:00
Alin Jerpelea
2749e6467b system: nxplayer & nxrecorder: nxstyle fixes
nxstyle fixes for nxplayer & nxrecorder apps

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2020-04-21 16:41:51 -06:00
Xiang Xiao
63288eb81f fix apps/include/graphics/nxwidgets/cwidgetcontrol.hxx:550:20: error: ‘m_xyinput’ was not declared in this scope
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-20 07:08:56 -06:00
Xiang Xiao
650b58d6b2 nshlib: Fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-19 08:07:06 -06:00
Xiang Xiao
de8a56d149 nshlib: Split shell functionality from nsh to sh
1.Improve the compatiblity as other OS
2.Avoid call nsh_initialize more than once

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-19 08:07:06 -06:00
Alan C. Assis
6e403fc343 Fix remaining issues with nxstyle 2020-04-16 20:39:47 -06:00
Alan C. Assis
04856ccfde Rescue incorrectly removed line 2020-04-16 20:39:47 -06:00
Alan C. Assis
d10eb2ae3a Fix nxstyle issue for Juha patch 2020-04-16 20:39:47 -06:00
Xiang Xiao
5720d72b71 apps: Fix the nightly build warning
src/cwindowfactory.cxx: In member function 'void Twm4Nx::CWindowFactory::redrawIcons(const nxgl_rect_s*)':
src/cwindowfactory.cxx:461:38: warning: 'iconPos.nxgl_point_s::y' may be used uninitialized in this function [-Wmaybe-uninitialized]
  461 |           iconBounds.pt2.y = iconPos.y + iconSize.h - 1;
      |                              ~~~~~~~~^
src/cwindowfactory.cxx:460:38: warning: 'iconPos.nxgl_point_s::x' may be used uninitialized in this function [-Wmaybe-uninitialized]
  460 |           iconBounds.pt2.x = iconPos.x + iconSize.w - 1;
      |                              ~~~~~~~~^

nsh_netcmds.c:424:20: warning: 'nsh_addrconv' defined but not used [-Wunused-function]
 static inline bool nsh_addrconv(FAR const char *hwstr,
                    ^
nsh_netcmds.c:446:20: warning: 'nsh_sethwaddr' defined but not used [-Wunused-function]
 static inline void nsh_sethwaddr(FAR const char *ifname,
                    ^

nsh_envcmds.c:94:21: warning: 'nsh_getdirpath' defined but not used [-Wunused-function]
 static inline char *nsh_getdirpath(FAR struct nsh_vtbl_s *vtbl,
                     ^

In file included from bas.c:84:0:
bas.c: In function 'bas_interpreter':
bas_error.h:110:37: warning: left-hand operand of comma expression has no effect [-Wunused-value]
 #define NOSUCHLINE         STATIC+40, _("No such line")
                                     ^
bas.c:2425:52: note: in expansion of macro 'NOSUCHLINE'
                           FS_putChars(STDCHANNEL, (NOSUCHLINE));
                                                    ^~~~~~~~~~
bas_fs.c:107:22: warning: 'g_vt100_colormap' defined but not used [-Wunused-const-variable=]
 static const uint8_t g_vt100_colormap[8] =
                      ^~~~~~~~~~~~~~~~
<stdout>:4048:16: warning: 'input' defined but not used [-Wunused-function]

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I62610b4c90e67637250cbd0107c2935c8abc542f
2020-04-13 08:32:42 -06:00
chao.an
df1d0e73f8 wireless/wapi: add save_config/reconnect support
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-04-03 13:29:19 +01:00
chao.an
6bafe90db4 wireless/wapi: independent scan and scan_results
add scan <ssid> support

Signed-off-by: chao.an <anchao@xiaomi.com>
2020-04-03 13:29:19 +01:00
Gregory Nutt
1a9444a68b Remove support for CONFIG_FS_WRITABLE and CONFIG_FS_READABLE 2020-03-22 08:23:28 -05:00
chao.an
52ad01f0bf netutils: save wapi config to file system
save and reload the wapi config from file system
2020-02-26 16:11:46 +00:00
chao.an
ee615f0568 net/wapi: remove unnecessary cast 2020-02-26 16:11:39 +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
779197c63e Ensure all source code end with one and only one newline
by this command:
git ls-files -z | while IFS= read -rd '' f; do tail -c1 < "$f" | read -r _ || echo >> "$f"; done
2020-02-09 08:14:49 -06:00
Xiang Xiao
bf3e6e2367 Improvements for telnet server
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
2020-02-04 19:09:22 -03:00
Xiang Xiao
1154735ca6 Refine the preprocess conditional guard style 2020-01-31 11:04:10 -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
Ouss4
eb1af03259 examples/sendmail: Few fixes to make the example run on a local SMTP
server.
2020-01-25 16:39:21 -06:00
chao.an
7612221df6 apps/wireless/wapi/scan: Add frequency/rssi printf
Scan print layout:

nsh> wapi scan wlan0
bssid / frequency / signal level / ssid
**:**:**:**:**:**       2437    -38     <ssid>
**:**:**:**:**:**       2427    -36     <ssid>
...
2020-01-22 07:53:02 -06:00
Xiang Xiao
6d22dd0013 Author: Gregory Nutt <gnutt@nuttx.org>
Run all .c and .h files in last PR through nxstyle and fix all complaints.

Author: Xiang Xiao <xiaoxiang@xiaomi.com>

    Wapi improvement (#16)

    * wireless: add passphrase control
    * wireless: add disconnect control
2020-01-16 12:21:45 -06:00
Xiang Xiao
db61c92100 Fix dhcpd #17
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
2020-01-16 12:06:25 -06: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
Gregory Nutt
64bc8f5b7f Run all .c and .h files modified in last PR through nxstyle. 2019-12-31 10:57:34 -06:00
Xiang Xiao
49c997501a Wapi simplify (#1)
apps/wireless/wapi:  Simplify usage of command line.  Remove duplicate extensions
2019-12-31 10:39:53 -06:00
Gregory Nutt
3da8091d30 Include nuttx/symtab.h instead of nuttx/binfmt/symtab.h since symtab.h under binfmt folder is for internal use. 2019-12-10 08:39:22 -06:00
Gregory Nutt
3ebf71095e Remove all support for the ancient Pascal compiler and pcode interpreter. 2019-11-21 07:04:34 -06:00
Gregory Nutt
1859f56380 apps/netutils/netinit, apps/netutils/netlib/, and apps/include/netutils/netlib.h: Extend a few definitions to permit building netutils and netinit with only Netlink sockets enabled. 2019-11-19 09:49:36 -06:00
Gregory Nutt
449290c8da apps/examples/netlink_route: Add test/example of NETLINK_ROUTE 'get' opeations. apps/netutils/netlib: Fixes to NETLINK_ROUTE helpers found by testing with apps/examples/netlink_route. 2019-11-11 13:40:57 -06:00
Gregory Nutt
438777cd38 netutils/netlib/netlib_getroute.c: Add function to retrieve routing tables using netlink. 2019-11-10 12:36:34 -06:00
Gregory Nutt
e260ea779c apps/netutils/netlib/netlib_getnbtab.c: Add a utility function that will return a list of all network devices in the UP state. 2019-11-09 17:38:02 -06:00
Gregory Nutt
2507cc15e8 netutils/netlib/netlib_getnbtab.c: Add support for retrieving a snapshot of the IPv6 neighbor table using Netlink sockets. 2019-11-08 11:30:32 -06:00
Gregory Nutt
b65c3dac0e netutils/netlib/netlib_getarptab.c: Misc fixes from initial testing with the 'arp -t' commeand. 2019-11-03 19:29:20 -06:00
Gregory Nutt
400995dec6 nshlib/nsh_netcmds.c: Add a -t option to the arp command which will enable printing the entire ARP table. 2019-11-03 16:19:14 -06:00
Gregory Nutt
768218ee81 netutils/netlib/netlib_getarptab.c: Add a function to read the entire ARP tableusing NETLINK_ROUTE protocol. 2019-11-03 15:13:47 -06:00
Dave Marples
b4134a674d nshlib/ and system/cle: Add basic color support to the CLE editor. 2019-10-12 00:47:29 +08:00
raiden00pl
ab7c5a7d4e Merged in raiden00/apps (pull request #200)
Some improvements to netutils/cjson and testing/unity

* netutils/cjson/Makefile: fix the error when creating Make.dep

* testing/unity/Makefile: fix the error when creating Make.dep

* include/.gitignore: ignore cJSON headers

* netutils/cjson/Kconfig: update default version to 1.7.12. Previous releases raise compilation warnings about redefined true/false

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-10-06 11:55:23 +00:00
Nathan Hartman
664e8a1410 Fix minor typos in docs and comments. 2019-09-29 12:53:39 -06:00
Gregory Nutt
e1d262e5d9 system/symtab: Remove system/symtab since the same functionality exist in nuttx now. 2019-09-28 11:05:31 -06:00
Nathan Hartman
b2a3ba57ff Fix typos 2019-09-11 08:59:08 -06:00
Nathan Hartman
6a6e9d1aa8 NxWidgets::CGraphicsPort: Fix small typo 2019-09-08 16:02:15 -06:00
Gregory Nutt
ac61c18fcc Move apps/builtins/builtin_forindex.c to nuttx/libs/libc/builtin since it is required by kernel logic as well. Other changes account for movement of builtin.h from nuttx/include/nuttx/binfmt/built.h to nuttx/include/lib/builtin.h. 2019-08-23 09:12:45 -06:00
Anthony Merlino
906f77a62d Merged in antmerlino/apps/libmac_fcslen (pull request #192)
wireless/ieee802154/libmac: Adds support for getting/setting the FCS length

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-10 18:17:54 +00:00
Gregory Nutt
735644766f apps/fsutils/passwd: Handle the improved the format of the /etc/passwd format. It is now a little similar to other systems. 2019-08-03 10:37:27 -06:00
Anthony Merlino
28f57f1007 Merged in antmerlino/apps/i8sak-improvements (pull request #188)
I8sak improvements

* wireless/ieee802154: Adds support for getting/setting maxretries and promsicuous mode from i8sak

* wireless/ieee802154/i8sak: Fixes a build warning and handles a few cases where a fault can occur due to not catching missing arguments.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-07-26 01:54:30 +00:00
Masayuki Ishikawa
9eff955556 Merged in masayuki2009/nuttx.apps/fix_webserver_with_period (pull request #183)
netutils/webserver: Fix directory listing containing period in name

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-07-06 13:05:45 +00:00
Masayuki Ishikawa
0b352178c1 Merged in masayuki2009/nuttx.apps/add_dirlist_to_webserver (pull request #181)
netutils/webserver: Add directory listing to httpd

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-07-05 02:58:53 +00:00