mirror of
https://github.com/apache/nuttx.git
synced 2026-05-29 04:19:37 +08:00
net/tcp: fix nxstyle warnings
Change-Id: Id885fefc80caa12806c73778e632c8b0c5888be0 Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
+10
-9
@@ -146,16 +146,16 @@ uint16_t tcp_callback(FAR struct net_driver_s *dev,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Preserve the TCP_ACKDATA, TCP_CLOSE, and TCP_ABORT in the response.
|
/* Preserve the TCP_ACKDATA, TCP_CLOSE, and TCP_ABORT in the response.
|
||||||
* These is needed by the network to handle responses and buffer state. The
|
* These is needed by the network to handle responses and buffer state.
|
||||||
* TCP_NEWDATA indication will trigger the ACK response, but must be
|
* The TCP_NEWDATA indication will trigger the ACK response, but must be
|
||||||
* explicitly set in the callback.
|
* explicitly set in the callback.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
ninfo("flags: %04x\n", flags);
|
ninfo("flags: %04x\n", flags);
|
||||||
|
|
||||||
/* Perform the data callback. When a data callback is executed from 'list',
|
/* Perform the data callback. When a data callback is executed from
|
||||||
* the input flags are normally returned, however, the implementation
|
* 'list', the input flags are normally returned, however, the
|
||||||
* may set one of the following:
|
* implementation may set one of the following:
|
||||||
*
|
*
|
||||||
* TCP_CLOSE - Gracefully close the current connection
|
* TCP_CLOSE - Gracefully close the current connection
|
||||||
* TCP_ABORT - Abort (reset) the current connection on an error that
|
* TCP_ABORT - Abort (reset) the current connection on an error that
|
||||||
@@ -175,10 +175,10 @@ uint16_t tcp_callback(FAR struct net_driver_s *dev,
|
|||||||
flags = devif_conn_event(dev, conn, flags, conn->list);
|
flags = devif_conn_event(dev, conn, flags, conn->list);
|
||||||
|
|
||||||
/* There may be no new data handler in place at them moment that the new
|
/* There may be no new data handler in place at them moment that the new
|
||||||
* incoming data is received. If the new incoming data was not handled, then
|
* incoming data is received. If the new incoming data was not handled,
|
||||||
* either (1) put the unhandled incoming data in the read-ahead buffer (if
|
* then either (1) put the unhandled incoming data in the read-ahead
|
||||||
* enabled) or (2) suppress the ACK to the data in the hope that it will
|
* buffer (if enabled) or (2) suppress the ACK to the data in the hope
|
||||||
* be re-transmitted at a better time.
|
* that it will be re-transmitted at a better time.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ((flags & TCP_NEWDATA) != 0)
|
if ((flags & TCP_NEWDATA) != 0)
|
||||||
@@ -261,6 +261,7 @@ uint16_t tcp_datahandler(FAR struct tcp_conn_s *conn, FAR uint8_t *buffer,
|
|||||||
iob = iob_tryalloc(throttled, IOBUSER_NET_TCP_READAHEAD);
|
iob = iob_tryalloc(throttled, IOBUSER_NET_TCP_READAHEAD);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (iob == NULL)
|
if (iob == NULL)
|
||||||
{
|
{
|
||||||
nerr("ERROR: Failed to create new I/O buffer chain\n");
|
nerr("ERROR: Failed to create new I/O buffer chain\n");
|
||||||
|
|||||||
@@ -145,8 +145,8 @@ uint16_t tcp_get_recvwindow(FAR struct net_driver_s *dev,
|
|||||||
* TCP buffering.
|
* TCP buffering.
|
||||||
*
|
*
|
||||||
* Assume that all of the available IOBs are can be used for buffering
|
* Assume that all of the available IOBs are can be used for buffering
|
||||||
* on this connection. Also assume that at least one chain is available
|
* on this connection. Also assume that at least one chain is
|
||||||
* concatenate the IOBs.
|
* available concatenate the IOBs.
|
||||||
*
|
*
|
||||||
* REVISIT: In an environment with multiple, active read-ahead TCP
|
* REVISIT: In an environment with multiple, active read-ahead TCP
|
||||||
* sockets (and perhaps multiple network devices) or if there are
|
* sockets (and perhaps multiple network devices) or if there are
|
||||||
|
|||||||
Reference in New Issue
Block a user