From: Holger Schemel Date: Sun, 24 Oct 2021 10:29:02 +0000 (+0200) Subject: added sending level set name when getting scores from server X-Git-Tag: 4.3.0.0~13 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=4cc589984c70d83f67e61fcfa6e7d9cf0e03347c;p=rocksndiamonds.git added sending level set name when getting scores from server --- diff --git a/src/files.c b/src/files.c index 11eba8f4..0b5ff039 100644 --- a/src/files.c +++ b/src/files.c @@ -9114,20 +9114,28 @@ static boolean SetRequest_ApiGetScore(struct HttpRequest *request, request->method = API_SERVER_METHOD; request->uri = API_SERVER_URI_GET; + char *levelset_identifier = getEscapedJSON(leveldir_current->identifier); + char *levelset_name = getEscapedJSON(leveldir_current->name); + snprintf(request->body, MAX_HTTP_BODY_SIZE, "{\n" "%s" " \"game_version\": \"%s\",\n" " \"game_platform\": \"%s\",\n" " \"levelset_identifier\": \"%s\",\n" + " \"levelset_name\": \"%s\",\n" " \"level_nr\": \"%d\"\n" "}\n", getPasswordJSON(setup.api_server_password), getProgramRealVersionString(), getProgramPlatformString(), - levelset.identifier, + levelset_identifier, + levelset_name, level_nr); + checked_free(levelset_identifier); + checked_free(levelset_name); + ConvertHttpRequestBodyToServerEncoding(request); return TRUE;