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 2021/06/30 11:39:25 UTC

[incubator-nuttx] 02/03: tcp_close_disconnect: don't nullify sndcb

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.git

commit 326a8ef0a28ff3ff5bfe5452dcf8295d6c849223
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Tue Jun 29 19:44:26 2021 +0900

    tcp_close_disconnect: don't nullify sndcb
    
    It isn't necessary and I plan to use the value later in
    the close processing.
---
 net/tcp/tcp_close.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/net/tcp/tcp_close.c b/net/tcp/tcp_close.c
index bd421c9..2998d0d 100644
--- a/net/tcp/tcp_close.c
+++ b/net/tcp/tcp_close.c
@@ -262,16 +262,6 @@ static inline int tcp_close_disconnect(FAR struct socket *psock)
     }
 #endif
 
-#ifdef CONFIG_NET_TCP_WRITE_BUFFERS
-  /* If we have a semi-permanent write buffer callback in place, then
-   * is needs to be be nullified.
-   *
-   * Note: the callback will be freed by tcp_free.
-   */
-
-  psock->s_sndcb = NULL;
-#endif
-
   /* Check for the case where the host beat us and disconnected first */
 
   if (conn->tcpstateflags == TCP_ESTABLISHED &&