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

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

commit df3da8342416116a318c7e50438f53ce74c796d8
Author: Yongrong Wang <[email protected]>
AuthorDate: Fri Aug 29 11:20:45 2025 +0800

    vsock_sockif.c: fix vsock notify error event.
    
    Report POLLERR | POLLHUP for the error event instead of POLLIN | POLLOUT,
    and dump the reply packet rather than the incoming request.
    
    Signed-off-by: Yongrong Wang <[email protected]>
---
 net/vsock/vsock_sockif.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/vsock/vsock_sockif.c b/net/vsock/vsock_sockif.c
index f9e9aebcd0c..87405a80b1f 100644
--- a/net/vsock/vsock_sockif.c
+++ b/net/vsock/vsock_sockif.c
@@ -399,7 +399,7 @@ static void vsock_notify(FAR struct vsock_conn_s *conn, int 
type)
       case VSOCK_NOTIFY_ERROR:
         vsock_post(&conn->rx_sem);
         vsock_post(&conn->tx_sem);
-        eventset = POLLIN | POLLOUT;
+        eventset = POLLERR | POLLHUP;
         break;
       case VSOCK_NOTIFY_LISTEN:
         vsock_post(&conn->rx_sem);
@@ -1195,7 +1195,7 @@ static int vsock_reset_no_conn(FAR struct 
vsock_transport_s *t,
   rhdr->flags    = 0;
   rhdr->len      = 0;
 
-  vsock_dump_pkt(pkt, "Send", false);
+  vsock_dump_pkt(&reply, "Send", false);
   return VSOCK_SEND_PKT(t, &reply);
 }
 

Reply via email to