You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/10/19 07:51:10 UTC

[incubator-nuttx-apps] branch master updated: Fixed unused variable and improved Kconfig for TCP IPC Client & Server

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new 00bd5a2ed Fixed unused variable and improved Kconfig for TCP IPC Client & Server
00bd5a2ed is described below

commit 00bd5a2edfb850adc71edcc50bbd2134de287240
Author: pedrobertoleti <pe...@eldorado.org.br>
AuthorDate: Tue Oct 18 13:56:55 2022 -0300

    Fixed unused variable and improved Kconfig for TCP IPC Client & Server
---
 examples/tcp_ipc_client/Kconfig               | 10 ++++++++--
 examples/tcp_ipc_client/tcp_ipc_client_main.c |  2 --
 examples/tcp_ipc_server/Kconfig               | 10 ++++++++--
 3 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/examples/tcp_ipc_client/Kconfig b/examples/tcp_ipc_client/Kconfig
index df7d04e99..b63a303a8 100644
--- a/examples/tcp_ipc_client/Kconfig
+++ b/examples/tcp_ipc_client/Kconfig
@@ -6,9 +6,15 @@
 config EXAMPLES_TCP_IPC_CLIENT
 	bool "Client for TCP IPC NuttX"
 	default n
-	depends on NET_TCP
-	depends on NET_SOCKOPTS
+	select ARCH_HAVE_NET
+	select ARCH_HAVE_NETDEV_STATISTICS
+	select NET_READAHEAD
+	select NET_TCP
+	select NET
+	select NET_SOCKOPTS
 	select NET_LOOPBACK
+	select NETDEV_LATEINIT
+	select SCHED_HPWORK
 	---help---
 		Enable the Client for TCP IPC NuttX example
 
diff --git a/examples/tcp_ipc_client/tcp_ipc_client_main.c b/examples/tcp_ipc_client/tcp_ipc_client_main.c
index c534f75a9..0359feb70 100644
--- a/examples/tcp_ipc_client/tcp_ipc_client_main.c
+++ b/examples/tcp_ipc_client/tcp_ipc_client_main.c
@@ -105,7 +105,6 @@ int main(int argc, char *argv[])
   int bytes_read_from_server = 0;
   struct sockaddr_in serv_addr;
   protocolo_ipc tprotocol;
-  int ndx;
 
   /* Check if there are sufficient arguments passed to this program */
 
@@ -115,7 +114,6 @@ int main(int argc, char *argv[])
       return 1;
     }
 
-  ndx = 1;
   if (strcmp(argv[1], "-h") == 0)
     {
       show_usage(argv[0]);
diff --git a/examples/tcp_ipc_server/Kconfig b/examples/tcp_ipc_server/Kconfig
index a0a56add7..c1f9634db 100644
--- a/examples/tcp_ipc_server/Kconfig
+++ b/examples/tcp_ipc_server/Kconfig
@@ -6,9 +6,15 @@
 config EXAMPLES_TCP_IPC_SERVER
 	bool "Server for TCP IPC NuttX"
 	default n
-	depends on NET_TCP
-	depends on NET_SOCKOPTS
+	select ARCH_HAVE_NET
+	select ARCH_HAVE_NETDEV_STATISTICS
+	select NET_READAHEAD
+	select NET_TCP
+	select NET
+	select NET_SOCKOPTS
 	select NET_LOOPBACK
+	select NETDEV_LATEINIT
+	select SCHED_HPWORK
 	---help---
 		Enable the TCP SERVER example