projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
stepping
[carveJwlIkooP6JGAAIwe30JlM.git]
/
server.c
diff --git
a/server.c
b/server.c
index 8225c6ecf988cd2071114e6b7617266a47cb7902..e3149c9caa371513ea1a64e95a39389cb1c7a8dd 100644
(file)
--- a/
server.c
+++ b/
server.c
@@
-11,6
+11,7
@@
#define _DEFAULT_SOURCE
#include <unistd.h>
#include <signal.h>
#define _DEFAULT_SOURCE
#include <unistd.h>
#include <signal.h>
+#include <time.h>
volatile sig_atomic_t sig_stop;
volatile sig_atomic_t sig_stop;
@@
-36,6
+37,7
@@
static void *hSteamHTTP,
static u8 steam_symetric_key[ k_nSteamEncryptedAppTicketSymmetricKeyLen ];
static HSteamNetPollGroup client_pollgroup;
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;
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 );
}
vg_free( buffer );
SteamAPI_ISteamHTTP_ReleaseHTTPRequest( hSteamHTTP, result->m_hRequest );
}
+#endif
static u64_steamid get_connection_authsteamid( SteamNetworkingMessage_t *msg )
{
static u64_steamid get_connection_authsteamid( SteamNetworkingMessage_t *msg )
{
@@
-332,8
+335,16
@@
int main( int argc, char *argv[] )
{
signal( SIGINT, inthandler );
signal( SIGQUIT, inthandler );
{
signal( SIGINT, inthandler );
signal( SIGQUIT, inthandler );
+
+ /* TODO: Options to override, ammend, remove etc */
+
+ vg_set_mem_quota( 80*1024*1024 );
+ vg_alloc_quota();
highscores_init( 250000, 10000 );
highscores_init( 250000, 10000 );
+
+ if( !highscores_read() )
+ highscores_create_db();
steamworks_ensure_txt( "2103940" );
if( !vg_load_steam_symetric_key( "application_key", steam_symetric_key ) )
steamworks_ensure_txt( "2103940" );
if( !vg_load_steam_symetric_key( "application_key", steam_symetric_key ) )
@@
-420,7
+431,6
@@
int main( int argc, char *argv[] )
}
highscores_serialize_all();
}
highscores_serialize_all();
- highscores_free();
SteamAPI_ISteamNetworkingSockets_DestroyPollGroup( hSteamNetworkingSockets,
client_pollgroup );
SteamAPI_ISteamNetworkingSockets_DestroyPollGroup( hSteamNetworkingSockets,
client_pollgroup );