X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=server.c;h=be3f2a9e0d10d6b52efd8cf3f252a82827c03d82;hb=219e917c414052ad3adbb4e9a652b55757a7b6a9;hp=d5d5d91f10291c708a6faa28c75ae27573a36f49;hpb=70792eeb23451cef1f3a103e0c9515b833f81899;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/server.c b/server.c index d5d5d91..be3f2a9 100644 --- a/server.c +++ b/server.c @@ -11,6 +11,7 @@ #define _DEFAULT_SOURCE #include #include +#include volatile sig_atomic_t sig_stop; @@ -36,6 +37,7 @@ static void *hSteamHTTP, static u8 steam_symetric_key[ k_nSteamEncryptedAppTicketSymmetricKeyLen ]; static HSteamNetPollGroup client_pollgroup; +#if 0 static void recieve_http( void *callresult, void *context ) { HTTPRequestCompleted_t *result = callresult; @@ -55,6 +57,7 @@ static void recieve_http( void *callresult, void *context ) vg_free( buffer ); SteamAPI_ISteamHTTP_ReleaseHTTPRequest( hSteamHTTP, result->m_hRequest ); } +#endif static u64_steamid get_connection_authsteamid( SteamNetworkingMessage_t *msg ) { @@ -335,7 +338,11 @@ int main( int argc, char *argv[] ) /* TODO: Options to override, ammend, remove etc */ + vg_set_mem_quota( 80*1024*1024 ); + vg_alloc_quota(); + highscores_init( 250000, 10000 ); + if( !highscores_read() ) highscores_create_db(); @@ -390,8 +397,8 @@ int main( int argc, char *argv[] ) hSteamHTTP, k_EHTTPMethodGET, "https://www.harrygodden.com/hello.txt" ); - steam_async *call1 = steam_new_async(); - call1->data = NULL; + vg_steam_async_call *call1 = vg_alloc_async_steam_api_call(); + call1->userdata = NULL; call1->p_handler = recieve_http; SteamAPI_ISteamHTTP_SendHTTPRequest( hSteamHTTP, test_req, &call1->id ); #endif @@ -424,7 +431,6 @@ int main( int argc, char *argv[] ) } highscores_serialize_all(); - highscores_free(); SteamAPI_ISteamNetworkingSockets_DestroyPollGroup( hSteamNetworkingSockets, client_pollgroup );