diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-02-25 16:41:11 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-02-25 16:41:11 -0600 |
commit | 9dcce886a413a43def88b254eaad545bd16e9f9d (patch) | |
tree | b8d2499845460fe217e06e0d29e7045f8aec4ffd /apps/examples/nettest | |
parent | d56d58f94575ce871558a43dd01b73c4d976bbfe (diff) | |
download | nuttx-9dcce886a413a43def88b254eaad545bd16e9f9d.tar.gz nuttx-9dcce886a413a43def88b254eaad545bd16e9f9d.tar.bz2 nuttx-9dcce886a413a43def88b254eaad545bd16e9f9d.zip |
networking: Fix one place where the reference count was not being zeroed. This is really a cosmetic fix UNLESS CONFIG_DEBUG_NET is enabled, then it causes assertions
Diffstat (limited to 'apps/examples/nettest')
-rw-r--r-- | apps/examples/nettest/Kconfig | 3 | ||||
-rw-r--r-- | apps/examples/nettest/nettest_server.c | 9 |
2 files changed, 7 insertions, 5 deletions
diff --git a/apps/examples/nettest/Kconfig b/apps/examples/nettest/Kconfig index 613b8ea91..c502b8864 100644 --- a/apps/examples/nettest/Kconfig +++ b/apps/examples/nettest/Kconfig @@ -51,6 +51,7 @@ config EXAMPLES_NETTEST_CLIENTIP EXAMPLES_NETTEST_CLIENTIP should be the same as EXAMPLES_NETTEST_IPADDR (default). If the target is the server, then the default value of EXAMPLES_NETTEST_CLIENTIP is set to the - gateway address, EXAMPLES_NETTEST_DRIPADDR. + host PC IP address (possibly the gateway address, + EXAMPLES_NETTEST_DRIPADDR?). endif diff --git a/apps/examples/nettest/nettest_server.c b/apps/examples/nettest/nettest_server.c index 5757a778a..ffa021286 100644 --- a/apps/examples/nettest/nettest_server.c +++ b/apps/examples/nettest/nettest_server.c @@ -134,10 +134,11 @@ void recv_server(void) /* Configure to "linger" until all data is sent when the socket is closed */ #ifdef NETTEST_HAVE_SOLINGER - ling.l_onoff = 1; - ling.l_linger = 30; /* timeout is seconds */ - if (setsockopt(acceptsd, SOL_SOCKET, SO_LINGER, &ling, sizeof(struct linger)) < 0) - { + ling.l_onoff = 1; + ling.l_linger = 30; /* timeout is seconds */ + + if (setsockopt(acceptsd, SOL_SOCKET, SO_LINGER, &ling, sizeof(struct linger)) < 0) + { message("server: setsockopt SO_LINGER failure: %d\n", errno); goto errout_with_acceptsd; } |