You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/01/21 14:09:45 UTC

[GitHub] [incubator-nuttx] patacongo commented on a change in pull request #140: Refine inet layout, no function change

patacongo commented on a change in pull request #140: Refine inet layout, no function change
URL: https://github.com/apache/incubator-nuttx/pull/140#discussion_r369020977
 
 

 ##########
 File path: net/tcp/tcp_close.c
 ##########
 @@ -38,69 +38,41 @@
  ****************************************************************************/
 
 #include <nuttx/config.h>
+#ifdef CONFIG_NET_TCP
 
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <stdint.h>
-#include <stdbool.h>
 #include <errno.h>
 #include <debug.h>
 #include <assert.h>
 
-#include <arch/irq.h>
-
-#include <nuttx/semaphore.h>
 #include <nuttx/net/net.h>
 #include <nuttx/net/netdev.h>
 #include <nuttx/net/tcp.h>
-#include <nuttx/net/udp.h>
 
 #include "netdev/netdev.h"
 #include "devif/devif.h"
 #include "tcp/tcp.h"
-#include "udp/udp.h"
-#include "pkt/pkt.h"
-#include "local/local.h"
 #include "socket/socket.h"
-#include "usrsock/usrsock.h"
-#include "inet/inet.h"
 
 /****************************************************************************
  * Private Types
  ****************************************************************************/
 
-#ifdef NET_TCP_HAVE_STACK
 struct tcp_close_s
 {
   FAR struct devif_callback_s *cl_cb;     /* Reference to TCP callback instance */
   FAR struct socket           *cl_psock;  /* Reference to the TCP socket */
   sem_t                        cl_sem;    /* Signals disconnect completion */
   int                          cl_result; /* The result of the close */
 };
-#endif
 
 Review comment:
   Why do you remove these dependencies on NET_TCP_HAVE_STACK.  Doesn't that break the USRSOCK case.  That is what those defines are for?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services