From 288c9a6b7a891a5705e3e76f8438d116b7314121 Mon Sep 17 00:00:00 2001 From: aldrikboy Date: Sun, 16 Feb 2020 13:21:40 +0100 Subject: ¨work¨ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/licensing.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/licensing.c') diff --git a/src/licensing.c b/src/licensing.c index 8de3604..bcbca80 100644 --- a/src/licensing.c +++ b/src/licensing.c @@ -10,14 +10,22 @@ static void* validate_license_thread(void *arg) { char params[50]; sprintf(params, "can_run?ti=%s", license_key); - + char response[MAX_INPUT_LENGTH]; if (platform_send_http_request("api.aldrik.org", params, response)) { + printf("yes\n"); cJSON *result = cJSON_Parse(response); + printf("%s\n", response); if (!result) return false; + printf("double yes\n"); cJSON *canRun = cJSON_GetObjectItem(result, "canRun"); license_is_valid = canRun->valueint; + printf("%s\n", response); + } + else + { + printf("failed to send request\n"); } return 0; @@ -28,7 +36,7 @@ void validate_license() license_is_valid = true; #ifdef MODE_DEVELOPER - return; + //return; #endif thread license_thread = thread_start(validate_license_thread, NULL); -- cgit v1.2.3-70-g09d2