server socket handling...

michael cardenas michael.cardenas at lindows.com
Tue Mar 26 22:02:03 CST 2002


I'd like to ask a question about the wineserver socket handling...

this is from server/sock.c
---------------

    /* if a network event is pending, signal the event object 
       it is possible that FD_CONNECT or FD_ACCEPT network events has happened
       before a WSAEventSelect() was done on it. 
       (when dealing with Asynchronous socket)  */
    if (sock->pmask & sock->mask)
        set_event(sock->event);

---------------
but, if an app is turning off it's event notification with an event mask of 
0, this will cause the pending messages to come in after the notification is 
turned off and the event is already orphaned, if the app only has one thread 
for socket event handling. 

which is what happens in aol7, here:

8d3b068:Call ws2_32.WSAAsyncSelect(000002e0,00020076,00000000,00000000) 
ret=6cc0c73a
trace:winsock:WINSOCK_DoAsyncEvent post: event bit 4, error 0
trace:winsock:WSAAsyncSelect 02e0, hWnd 0076, uMsg 00000000, event 00000000
trace:winsock:WSAEventSelect 000002e0, hEvent 00000000, event 00000000
08d3b068:Ret  ws2_32.WSAAsyncSelect() retval=00000000 ret=6cc0c73a
08d3b068:Call ws2_32.ioctlsocket(000002e0,8004667e,44266e50) ret=6cc0c751
trace:winsock:WINSOCK_DoAsyncEvent socket 000002e0, event 0000031c
trace:winsock:WS_ioctlsocket socket 02e0, cmd WS_FIONBIO, ptr 44266e50
trace:winsock:WINSOCK_DoAsyncEvent orphaned event: 00000010
trace:winsock:WINSOCK_DoAsyncEvent orphaned event, self-destructing

is there any way to make the pending events go through before turning off the 
event notification?



-- 
michael cardenas
lead windows compatibility engineer
www.lindows.com

"Be the change you want to see in the world."
-Mahatma Ghandi





More information about the wine-devel mailing list