struct HttpResponse *response,
int nr)
{
- request->hostname = API_SERVER_HOSTNAME;
+ request->hostname = setup.api_server_hostname;
request->port = API_SERVER_PORT;
request->method = API_SERVER_METHOD;
request->uri = API_SERVER_URI_GET;
// (this should prevent reading it while the thread is writing to it)
LoadServerScoreFromCache(nr);
- if (download_score)
+ if (download_score && runtime.api_server)
{
// 2nd step: download server scores from score server to cache file
// (as thread, as it might time out if the server is not reachable)
{
struct ScoreEntry *score_entry = &scores.entry[scores.last_added];
- request->hostname = API_SERVER_HOSTNAME;
+ request->hostname = setup.api_server_hostname;
request->port = API_SERVER_PORT;
request->method = API_SERVER_METHOD;
request->uri = API_SERVER_URI_ADD;
void SaveServerScore(int nr)
{
- if (!setup.api_server)
+ if (!runtime.api_server)
return;
UploadScoreToServerAsThread(nr);