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 2022/08/25 17:24:19 UTC
[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #6923: net: remove pvconn reference from all devif callback
pkarashchenko commented on code in PR #6923:
URL: https://github.com/apache/incubator-nuttx/pull/6923#discussion_r955237350
##########
net/tcp/tcp_close.c:
##########
@@ -306,13 +303,13 @@ static inline int tcp_close_disconnect(FAR struct socket *psock)
if ((conn->tcpstateflags == TCP_ESTABLISHED ||
conn->tcpstateflags == TCP_LAST_ACK) &&
- (cb = tcp_callback_alloc(conn)) != NULL)
+ (conn->clscb = tcp_callback_alloc(conn)) != NULL)
{
/* Set up to receive TCP data event callbacks */
- cb->flags = (TCP_NEWDATA | TCP_POLL | TCP_DISCONN_EVENTS);
- cb->event = tcp_close_eventhandler;
- cb->priv = cb; /* reference for event handler to free cb */
+ conn->clscb->flags = (TCP_NEWDATA | TCP_POLL | TCP_DISCONN_EVENTS);
Review Comment:
```suggestion
conn->clscb->flags = TCP_NEWDATA | TCP_POLL | TCP_DISCONN_EVENTS;
```
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org