gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnurl] 50/411: sockfilt: handle FD_CLOSE winsock event on write socket


From: gnunet
Subject: [gnurl] 50/411: sockfilt: handle FD_CLOSE winsock event on write socket
Date: Wed, 13 Jan 2021 01:17:45 +0100

This is an automated email from the git hooks/post-receive script.

nikita pushed a commit to branch master
in repository gnurl.

commit 5fcad1c1c6b5301870b2a21f070e86f1a797b624
Author: Marc Hoersken <info@marc-hoersken.de>
AuthorDate: Fri Aug 28 22:30:39 2020 +0200

    sockfilt: handle FD_CLOSE winsock event on write socket
    
    Learn from the way Cygwin handles and maps the WinSock events
    to simulate correct and complete poll and select behaviour
    according to Richard W. Stevens Network Programming book.
    
    Follow up to #5867
    Closes #5879
---
 tests/server/sockfilt.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/server/sockfilt.c b/tests/server/sockfilt.c
index 6b3758c94..f5281817d 100644
--- a/tests/server/sockfilt.c
+++ b/tests/server/sockfilt.c
@@ -705,7 +705,7 @@ static int select_ws(int nfds, fd_set *readfds, fd_set 
*writefds,
 
     if(FD_ISSET(wsasock, writefds)) {
       FD_SET(wsasock, &writesock);
-      wsaevents.lNetworkEvents |= FD_WRITE|FD_CONNECT;
+      wsaevents.lNetworkEvents |= FD_WRITE|FD_CONNECT|FD_CLOSE;
     }
 
     if(FD_ISSET(wsasock, exceptfds)) {
@@ -835,11 +835,11 @@ static int select_ws(int nfds, fd_set *readfds, fd_set 
*writefds,
             FD_CLR(wsasock, readfds);
 
           /* remove from descriptor set if not ready for write/connect */
-          if(!(wsaevents.lNetworkEvents & (FD_WRITE|FD_CONNECT)))
+          if(!(wsaevents.lNetworkEvents & (FD_WRITE|FD_CONNECT|FD_CLOSE)))
             FD_CLR(wsasock, writefds);
 
           /* remove from descriptor set if not exceptional */
-          if(!(wsaevents.lNetworkEvents & (FD_OOB)))
+          if(!(wsaevents.lNetworkEvents & FD_OOB))
             FD_CLR(wsasock, exceptfds);
         }
       }

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]