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 2020/02/08 16:33:46 UTC

[incubator-nuttx-apps] branch master updated (f14aead -> c8dbd59)

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

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


    from f14aead  Shouldn't use local readline in telnet
     new d2522e2  apps/netutils/telnetd:  Fix undefined reference to setsockopt.
     new c8dbd59  netutils/telnetd/telnetd_daemon.c: Avoid a warning if CONFIG_NET_SOCKOPTS=n

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 netutils/telnetd/telnetd_daemon.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)


[incubator-nuttx-apps] 02/02: netutils/telnetd/telnetd_daemon.c: Avoid a warning if CONFIG_NET_SOCKOPTS=n

Posted by xi...@apache.org.
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

commit c8dbd59e9a8f2f7c9bb4391a32fda01b409059e2
Author: Gregory Nutt <gn...@nuttx.org>
AuthorDate: Sat Feb 8 10:24:16 2020 -0600

    netutils/telnetd/telnetd_daemon.c: Avoid a warning if CONFIG_NET_SOCKOPTS=n
---
 netutils/telnetd/telnetd_daemon.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/netutils/telnetd/telnetd_daemon.c b/netutils/telnetd/telnetd_daemon.c
index 1720e32..caff6ef 100644
--- a/netutils/telnetd/telnetd_daemon.c
+++ b/netutils/telnetd/telnetd_daemon.c
@@ -127,7 +127,9 @@ static int telnetd_daemon(int argc, FAR char *argv[])
   int listensd;
   int acceptsd;
   int drvrfd;
+#ifdef CONFIG_NET_SOCKOPTS
   int optval;
+#endif
   int ret;
   int fd;
 


[incubator-nuttx-apps] 01/02: apps/netutils/telnetd: Fix undefined reference to setsockopt.

Posted by xi...@apache.org.
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

commit d2522e282184975668c4629dca1b2428781f5fe3
Author: Gregory Nutt <gn...@nuttx.org>
AuthorDate: Sat Feb 8 10:16:13 2020 -0600

    apps/netutils/telnetd:  Fix undefined reference to setsockopt.
    
    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
---
 netutils/telnetd/telnetd_daemon.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/netutils/telnetd/telnetd_daemon.c b/netutils/telnetd/telnetd_daemon.c
index 776460f..1720e32 100644
--- a/netutils/telnetd/telnetd_daemon.c
+++ b/netutils/telnetd/telnetd_daemon.c
@@ -176,6 +176,7 @@ static int telnetd_daemon(int argc, FAR char *argv[])
       goto errout_with_daemon;
     }
 
+#ifdef CONFIG_NET_SOCKOPTS
   /* Set socket to reuse address */
 
   optval = 1;
@@ -185,6 +186,7 @@ static int telnetd_daemon(int argc, FAR char *argv[])
       nerr("ERROR: setsockopt SO_REUSEADDR failure: %d\n", errno);
       goto errout_with_socket;
     }
+#endif
 
   /* Bind the socket to a local address */
 
@@ -261,9 +263,9 @@ static int telnetd_daemon(int argc, FAR char *argv[])
             }
         }
 
+#ifdef CONFIG_NET_SOLINGER
       /* Configure to "linger" until all data is sent when the socket is closed */
 
-#ifdef CONFIG_NET_SOLINGER
       ling.l_onoff  = 1;
       ling.l_linger = 30;     /* timeout is seconds */
       if (setsockopt(acceptsd, SOL_SOCKET, SO_LINGER, &ling, sizeof(struct linger)) < 0)