acassis commented on code in PR #12688:
URL: https://github.com/apache/nuttx/pull/12688#discussion_r1683550346
##########
net/pkt/pkt_sendmsg.c:
##########
@@ -106,13 +106,14 @@ static uint16_t psock_send_eventhandler(FAR struct
net_driver_s *dev,
/* Copy the packet data into the device packet buffer and send it */
int ret = devif_send(dev, pstate->snd_buffer,
- pstate->snd_buflen, 0);
+ pstate->snd_buflen, -NET_LL_HDRLEN(dev));
if (ret <= 0)
{
pstate->snd_sent = ret;
goto end_wait;
}
+ dev->d_len = dev->d_sndlen -= NET_LL_HDRLEN(dev);
Review Comment:
Good point @pkarashchenko this code is confuse!
--
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]