server_scores.updated = TRUE;
}
-static void ApiGetScore(void *data_raw)
+static int ApiGetScoreThread(void *data_raw)
{
struct HttpRequest *request = checked_calloc(sizeof(struct HttpRequest));
struct HttpResponse *response = checked_calloc(sizeof(struct HttpResponse));
ApiGetScoreExt(request, response,
data_raw);
+ FreeThreadData_ApiGetScore(data_raw);
+
checked_free(request);
checked_free(response);
-}
-
-static int ApiGetScoreThread(void *data_raw)
-{
- ApiGetScore(data_raw);
-
- FreeThreadData_ApiGetScore(data_raw);
return 0;
}
server_scores.uploaded = TRUE;
}
-static void ApiAddScore(void *data_raw)
+static int ApiAddScoreThread(void *data_raw)
{
struct HttpRequest *request = checked_calloc(sizeof(struct HttpRequest));
struct HttpResponse *response = checked_calloc(sizeof(struct HttpResponse));
ApiAddScoreExt(request, response,
data_raw);
+ FreeThreadData_ApiAddScore(data_raw);
+
checked_free(request);
checked_free(response);
-}
-
-static int ApiAddScoreThread(void *data_raw)
-{
- ApiAddScore(data_raw);
-
- FreeThreadData_ApiAddScore(data_raw);
return 0;
}
}
}
-static void ApiRenamePlayer(void *data_raw)
+static int ApiRenamePlayerThread(void *data_raw)
{
struct HttpRequest *request = checked_calloc(sizeof(struct HttpRequest));
struct HttpResponse *response = checked_calloc(sizeof(struct HttpResponse));
ApiRenamePlayerExt(request, response, data_raw);
+ FreeThreadData_ApiRenamePlayer(data_raw);
+
checked_free(request);
checked_free(response);
-}
-
-static int ApiRenamePlayerThread(void *data_raw)
-{
- ApiRenamePlayer(data_raw);
-
- FreeThreadData_ApiRenamePlayer(data_raw);
return 0;
}