From 5e3662736647faed149c4834a0f779f8059a5351 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 1 Jul 2019 08:12:51 -0600 Subject: [PATCH] Update TODO list and fix an error in conditional compilation that I introduced with the last commit. --- TODO | 25 ++++++++++++++++++++++++- net/inet/inet_close.c | 4 ++-- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/TODO b/TODO index 34b3a15671..c0b0dba08b 100644 --- a/TODO +++ b/TODO @@ -19,7 +19,7 @@ nuttx/: (9) Kernel/Protected Build (3) C++ Support (5) Binary loaders (binfmt/) - (17) Network (net/, drivers/net) + (18) Network (net/, drivers/net) (4) USB (drivers/usbdev, drivers/usbhost) (2) Other drivers (drivers/) (9) Libraries (libs/libc/, libs/libm/) @@ -1663,6 +1663,29 @@ o Network (net/, drivers/net) anything but a well-known point-to-point configuration impossible. + Title: SO_LINGER IMPLEMENTATION IS INCORRECT + Description: Support for the SO_LINGER socket option is implemented but + not correctly. Currently, it simply adds a timeout to the + "normal" delay for the FIN to be sent with an additional + timeout. That is not even close to the required behavior. + Per OpenGroup.org: + + SO_LINGER + Lingers on a close() if data is present. This option + controls the action taken when unsent messages queue + on a socket and close() is performed. If SO_LINGER + is set, the system shall block the calling thread + during close() until it can transmit the data or + until the time expires. If SO_LINGER is not specified, + and close() is issued, the system handles the call + in a way that allows the calling thread to continue + as quickly as possible. This option takes a linger + structure, as defined in the header, + to specify the state of the option and linger interval. + + Status: Open + Priority: Medium Low. + o USB (drivers/usbdev, drivers/usbhost) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/net/inet/inet_close.c b/net/inet/inet_close.c index 5e587417e2..1cd44e7410 100644 --- a/net/inet/inet_close.c +++ b/net/inet/inet_close.c @@ -421,9 +421,9 @@ static inline int tcp_close_disconnect(FAR struct socket *psock) } } else -#else +#endif { - (void)net_timedwait(&state.cl_sem, NULL); + (void)net_lockedwait(&state.cl_sem); } /* We are now disconnected */