From f889bb28e3f68903ad02985fa527aa04e86230e4 Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Thu, 25 Aug 2022 12:02:16 +0200 Subject: [PATCH] created CURL_TIMEOUT constant and implemented it ofc --- include/flags.h | 1 + src/lib/misc.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/flags.h b/include/flags.h index b71d866..0d9a0d2 100644 --- a/include/flags.h +++ b/include/flags.h @@ -25,6 +25,7 @@ const enum EXIT_CODES //exit codes you fucking idiot #define CLEAR_SCREEN "\e[1;1H\e[2J" //TEXT FOR UNIX CLEAR SCREEN +#define CURL_TIMEOUT 3 //if you need comment explaining, what the fuck is timeout, don't change WHY2's code, alright? thx, love ya #define NOT_FOUND_TRIES 10 //NUMBER OF TRIES FOR DOWNLOADING versions.json #define DEPRECATED __attribute__((deprecated)) //SAME COMMENT AS VERSIONS_NAME'S diff --git a/src/lib/misc.c b/src/lib/misc.c index 165e977..68d7257 100644 --- a/src/lib/misc.c +++ b/src/lib/misc.c @@ -86,7 +86,7 @@ _Bool checkVersion() //GET versions.json curl_easy_setopt(curl, CURLOPT_URL, VERSIONS_URL); curl_easy_setopt(curl, CURLOPT_WRITEDATA, fileBuffer); - curl_easy_setopt(curl, CURLOPT_TIMEOUT, 3); + curl_easy_setopt(curl, CURLOPT_TIMEOUT, CURL_TIMEOUT); //DOWNLOAD versions.json curl_easy_perform(curl);