X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=network.c;h=fdec386ccd62f0e884414ea860f5f28c4df67612;hb=494c85703c76c4123c49937a32584840b6be1470;hp=4c9c61afd7424fb9e5d9fd66da47cacc3851e390;hpb=8f2a6f95c2862cea9c1cf800628cd4f4c630e30b;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/network.c b/network.c index 4c9c61a..fdec386 100644 --- a/network.c +++ b/network.c @@ -16,9 +16,14 @@ #include "ent_region.h" #include "vg/vg_loader.h" -#include -#include -#include +#ifdef _WIN32 + #include + #include +#else + #include + #include + #include +#endif struct network_client network_client = { @@ -613,7 +618,22 @@ static void network_resolve_host_thread( void *_ ) &hints, &result); if( s != 0 ) { +#ifndef _WIN32 vg_error( "getaddrinfo: %s\n", gai_strerror(s) ); +#endif + + if( !strcmp( network_client.host_adress, "skaterift.com" ) ) + { + vg_warn( "getaddrinfo failed for skaterift.com;\n " + "falling back to a hardcoded IPv4\n" ); + strcpy( network_client.host_adress, "46.101.34.155" ); + SteamAPI_SteamNetworkingIPAddr_ParseString( + &network_client.ip, + network_client.host_adress ); + network_client.ip.m_port = NETWORK_PORT; + *status = 1; + } + goto end; }