RFC: Revised patchset to fix Bug 7929 (C&C 3 network does not work)

Erich Hoover ehoover at mines.edu
Sat Sep 18 21:44:27 CDT 2010

I realize it's been some time since I've submitted something for the
networking problems with the C&C games, but I believe I've come up
with something that resolves the major show-stopping issue that was
discussed previously.  Here is the original thread, for reference:

Specifically, this set of patches is revised to address the problem of
throwing away packets destined for the incorrect interface in a
multi-threaded/multi-process environment.  The approach used here is
to create a global (named) POSIX.1-2001 semaphore for each socket with
the form
, where "FD" is the Unix file descriptor corresponding to the socket
at hand.  These semaphores are only created for UDP sockets bound to a
specific interface and are locked/unlocked by both the Wine user-space
and the Wine server.

These patches are against wine-1.3.3 and are split apart according to
function.  The most revised portions since the original set are 2/6
(server-side creation of semaphore), 3/6 (locking and unlocking), and
6/6 (server-side locking and unlocking).  If I could get some feedback
on these patches then I would greatly appreciate it, it'd be really
nice to finally get this issue resolved.  Thanks in advance!

[1/6] ws2_32/tests: Add UDP broadcast tests:
[2/6] server: Add mechanism for storing an interface ID with a socket:
[3/6] ws2_32: Patch to selectively bind to interfaces while still
allowing broadcast packets:
[4/6] ws2_32: Ensure select does not wake up on packets with an
interface mismatch:
[5/6] ws2_32: Ensure Async WSARecv does not wake up on packets with an
interface mismatch:
[6/6] server: Ensure Async ReadFile does not wake up on packets with
an interface mismatch:

Erich Hoover
ehoover at mines.edu

More information about the wine-devel mailing list