Commit 983088a0 authored by Christoph Frick's avatar Christoph Frick Committed by Alexandre Julliard

Force (WS_)SO_REUSEADDR before binding to a socket; ignore

(WS_)SO_DONTROUTE; Network games in Grand Prix Legends and Nascar 2002 are possible now.
parent bcf2a782
......@@ -1479,6 +1479,12 @@ int WINAPI WS_bind(SOCKET s, const struct WS_sockaddr* name, int namelen)
}
else
{
int on = 1;
/* The game GrandPrixLegends binds more than one time, but does
* not do a SO_REUSEADDR - Stevens says this is ok */
FIXME( "Setting WS_SO_REUSEADDR on socket before we binding it\n");
WS_setsockopt( s, WS_SOL_SOCKET, WS_SO_REUSEADDR, (char*)&on, sizeof(on) );
if (bind(fd, uaddr, uaddrlen) < 0)
{
int loc_errno = errno;
......@@ -2678,6 +2684,17 @@ int WINAPI WS_setsockopt(SOCKET s, int level, int optname,
return 0;
}
/* For some reason the game GrandPrixLegends does set SO_DONTROUTE on its
* socket. This will either not happen under windows or it is ignored in
* windows (but it works in linux and therefor prevents the game to find
* games outsite the current network) */
if ( level==WS_SOL_SOCKET && optname==WS_SO_DONTROUTE )
{
FIXME("Does windows ignore SO_DONTROUTE?\n");
return 0;
}
fd = _get_sock_fd(s);
if (fd != -1)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment