This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 22feaeeebb Bugfixed the SocketCAN send via setting the dev->d_len to 
dev->d_sndlen. The dev->d_len wouldn't be assigned otherwise.
22feaeeebb is described below

commit 22feaeeebb26ecf842188a5409bdfee10bfbc218
Author: David <[email protected]>
AuthorDate: Fri Jan 27 13:19:47 2023 +0100

    Bugfixed the SocketCAN send via setting the dev->d_len to dev->d_sndlen. 
The dev->d_len wouldn't be assigned otherwise.
---
 net/can/can_sendmsg.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/can/can_sendmsg.c b/net/can/can_sendmsg.c
index f41bcb6115..b635895f14 100644
--- a/net/can/can_sendmsg.c
+++ b/net/can/can_sendmsg.c
@@ -107,6 +107,7 @@ static uint16_t psock_send_eventhandler(FAR struct 
net_driver_s *dev,
           /* Copy the packet data into the device packet buffer and send it */
 
           devif_send(dev, pstate->snd_buffer, pstate->snd_buflen, 0);
+          dev->d_len = dev->d_sndlen;
           if (dev->d_sndlen == 0)
             {
               return flags;

Reply via email to