ws2_32: rather return SOCKET_ERROR in stubbed WSALookupServiceNext, to prevent apps from looping forever.

Louis Lenders xerox_xerox2000 at yahoo.co.uk
Wed Oct 27 16:14:10 CDT 2010


Because applications are looping WSALookupServiceNext calls until SOCKET_ERROR is is returned (with last error WSA_E_NO_MORE meaning all data are retieved) to break out of the loop, in current wine they will be looping forever. See for example http://www.winsocketdotnetworkprogramming.com/winsock2programming/winsock2advancednsrnr8c.html

As WSALookupServiceNext is a complete stub, it's better to not return 0 anyway. This fixes problem reported in http://bugs.winehq.org/show_bug.cgi?id=17436


      
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0002-ws2_32-rather-return-SOCKET_ERROR-in-stubbed-WSALookup.txt
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20101027/f28febcc/attachment.txt>


More information about the wine-patches mailing list