https://bugs.winehq.org/show_bug.cgi?id=38224
Bug ID: 38224 Summary: AcceptEx detaches the socket from its IO completion port Product: Wine Version: 1.6.2 Hardware: x86 OS: Mac OS X Status: UNCONFIRMED Severity: normal Priority: P2 Component: winsock Assignee: wine-bugs@winehq.org Reporter: mterrisse@free.fr
Created attachment 51024 --> https://bugs.winehq.org/attachment.cgi?id=51024 Source + binary for BugAcceptEx
Hello,
On a server I have a listening socket lListeningSocket := socket (PF_INET, SOCK_STREAM, IPPROTO_TCP); CreateIoCompletionPort (lListeningSocket, lIoCompletionPort, 0, 0); bind (lListeningSocket, PSockAddr (@lAddress)^, SizeOf (TSockAddrIn)); listen (lListeningSocket, 1); and I prepare a socket for a new connection lSocket := socket (PF_INET, SOCK_STREAM, IPPROTO_TCP); CreateIoCompletionPort (lSocket, lIoCompletionPort, 0, 0); then call AcceptEx lPtrAcceptEx (lListeningSocket, lSocket, ...);
GetQueuedCompletionStatus (lIoCompletionPort, ...) signals completion for AcceptEx for an incoming connection (so CreateIoCompletionPort (lListeningSocket, ...) works fine), but never signals completion for events on lSocket, not even a disconnection.
If I call again CreateIoCompletionPort (lSocket, lIoCompletionPort, 0, 0); after the completion of AcceptEx, it works fine. So AcceptEx as detached lSocket from the IO completion port.
To help reproducting it, I created a little command line server BugAcceptEx.exe Here attached is the code (Delphi) and the executable.
In a command prompt run BugAcceptEx 1234 and in another command prompt telnet localhost 1234 and press a key
Under Windows it works fine, under Mac + Wine the server signals the incoming connection but never signals data nor disconnection.
Now if you do BugAcceptEx 1235 WithPatch and telnet localhost 1235 it works fine
Thank you for your help.
Regards,
Michel Terrisse
https://bugs.winehq.org/show_bug.cgi?id=38224
Michel Terrisse mterrisse@free.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mterrisse@free.fr
https://bugs.winehq.org/show_bug.cgi?id=38224
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastian@fds-team.de
https://bugs.winehq.org/show_bug.cgi?id=38224
--- Comment #1 from Dmitry Timoshkov dmitry@baikal.ru --- Probably fixed by 5db44d15ac6f87f8ef340a837955050870ca4246, please retest in current git.
https://bugs.winehq.org/show_bug.cgi?id=38224
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |5db44d15ac6f87f8ef340a83795 | |5050870ca4246 Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED
--- Comment #2 from Bruno Jesus 00cpxxx@gmail.com --- (In reply to Dmitry Timoshkov from comment #1)
Probably fixed by 5db44d15ac6f87f8ef340a837955050870ca4246, please retest in current git.
Tested with the same from comment 1 and it works. Assuming fixed.
https://bugs.winehq.org/show_bug.cgi?id=38224
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.50.