anchao commented on a change in pull request #5373:
URL: https://github.com/apache/incubator-nuttx/pull/5373#discussion_r797494484



##########
File path: net/tcp/tcp_send_buffered.c
##########
@@ -376,6 +376,29 @@ static uint16_t psock_send_eventhandler(FAR struct 
net_driver_s *dev,
   conn = psock->s_conn;
   DEBUGASSERT(conn != NULL);
 
+#ifdef CONFIG_DEBUG_NET_ERROR
+  if (conn->dev == NULL || (pvconn != conn && pvconn != NULL))
+    {
+      nerr("ERROR: conn->dev == NULL or pvconn != conn:"
+           " dev=%p pvconn=%p pvpriv=%p flags=0x%04x"

Review comment:
       The dump of connect could be implement to a common feature, the 
developers can reuse this api to debug other stack issues
   
   if this PR is a common feature, welcome.
   If this PR is just for testing or debugging, please mark the tag as draft 
and send the patch link to reporter locally, I hope the issue can be resolved 
before mainline.
   
   about #5252, I will upload relevant patch asap.




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to