From 9dcce886a413a43def88b254eaad545bd16e9f9d Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 25 Feb 2014 16:41:11 -0600 Subject: 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 --- apps/examples/nettest/Kconfig | 3 ++- apps/examples/nettest/nettest_server.c | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'apps/examples/nettest') 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; } -- cgit v1.2.3