liamHowatt commented on PR #17699:
URL: https://github.com/apache/nuttx/pull/17699#issuecomment-3699381467

   Hey @HedongGao I see a new issue with userfs. I found a fix but I'm not sure 
what the best solution is.
   
   `sim:userfs` defconfig.
   
   ```
   nsh> userfs
   nsh> ls mnt/ufstest
   ```
   
   It gets stuck.
   
   I could fix it with this change.
   
   ```diff
   diff --git a/net/udp/udp_devpoll.c b/net/udp/udp_devpoll.c
   index 4ff4994c4e..e35bc78934 100644
   --- a/net/udp/udp_devpoll.c
   +++ b/net/udp/udp_devpoll.c
   @@ -103,7 +103,7 @@ void udp_poll(FAR struct net_driver_s *dev, FAR struct 
udp_conn_s *conn)
    
          /* If the application has data to send, setup the UDP/IP header */
    
   -      if (dev->d_len > 0)
   +      if (dev->d_sndlen > 0)
            {
              udp_send(dev, conn);
              return;
   diff --git a/net/udp/udp_send.c b/net/udp/udp_send.c
   index 8b59be7fb2..f4f4539f99 100644
   --- a/net/udp/udp_send.c
   +++ b/net/udp/udp_send.c
   @@ -155,7 +155,7 @@ void udp_send(FAR struct net_driver_s *dev, FAR struct 
udp_conn_s *conn)
    
      ninfo("UDP payload: %d (%d) bytes\n", dev->d_sndlen, dev->d_len);
    
   -  if (dev->d_len > 0)
   +  if (dev->d_sndlen > 0)
        {
    #ifdef CONFIG_NET_IPv4
    #ifdef CONFIG_NET_IPv6
   ```
   
   devif_send.c sets `d_sndlen` while `d_len` remains 0.
   
   
https://github.com/apache/nuttx/blob/0625b7a760c4c21f872dae823c7eb3dc7c345d7a/net/devif/devif_send.c#L116
   
   Is devif_send.c wrong for setting `d_sndlen` instead of `d_len`?


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