Przeglądaj źródła

Fix SIGSEGV on Alpine

JDierkse 5 lat temu
rodzic
commit
88ece69bbe
1 zmienionych plików z 7 dodań i 7 usunięć
  1. 7 7
      Http/HttpClientImpl.cpp

+ 7 - 7
Http/HttpClientImpl.cpp

@@ -213,7 +213,7 @@ std::string HttpClientImpl::GetUrlPostAttachmentContents(const std::string& url,
 	curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, &WriteCallback);
 	curl_easy_setopt(curl, CURLOPT_WRITEDATA, &buffer);
 
-	int code = 0;
+	long code = 0;
 	curl_easy_perform(curl);
 	curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &code);
 	curl_easy_cleanup(curl);
@@ -290,7 +290,7 @@ void HttpClientImpl::GetUrlPostAttachmentSilent(const std::string& url, const st
 	curl_easy_setopt(curl, CURLOPT_TIMEOUT, m_timeout);
 	curl_easy_setopt(curl, CURLOPT_HTTPPOST, formpost);
 
-	int code = 0;
+	long code = 0;
 	curl_easy_perform(curl);
 	curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &code);
 	curl_easy_cleanup(curl);
@@ -364,7 +364,7 @@ std::string HttpClientImpl::GetUrlPostAttachmentRedirect(const std::string& url,
 	curl_easy_setopt(curl, CURLOPT_TIMEOUT, m_timeout);
 	curl_easy_setopt(curl, CURLOPT_HTTPPOST, formpost);
 
-	int code = 0;
+	long code = 0;
 	curl_easy_perform(curl);
 	curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &code);
 
@@ -458,7 +458,7 @@ std::string HttpClientImpl::GetUrlPostAttachmentContents(const std::string& url,
 	curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, &WriteCallback);
 	curl_easy_setopt(curl, CURLOPT_WRITEDATA, &buffer);
 
-	int code = 0;
+	long code = 0;
 	curl_easy_perform(curl);
 	curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &code);
 	curl_easy_cleanup(curl);
@@ -537,7 +537,7 @@ void HttpClientImpl::GetUrlPostAttachmentSilent(const std::string& url, const st
 	curl_easy_setopt(curl, CURLOPT_COOKIEFILE, cookieFile.c_str());
 	curl_easy_setopt(curl, CURLOPT_COOKIEJAR, cookieFile.c_str());
 
-	int code = 0;
+	long code = 0;
 	curl_easy_perform(curl);
 	curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &code);
 	curl_easy_cleanup(curl);
@@ -613,7 +613,7 @@ std::string HttpClientImpl::GetUrlPostAttachmentRedirect(const std::string& url,
 	curl_easy_setopt(curl, CURLOPT_COOKIEFILE, cookieFile.c_str());
 	curl_easy_setopt(curl, CURLOPT_COOKIEJAR, cookieFile.c_str());
 
-	int code = 0;
+	long code = 0;
 	curl_easy_perform(curl);
 	curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &code);
 
@@ -699,7 +699,7 @@ std::string HttpClientImpl::PerformOperation(HttpClientImpl::Operation::type typ
 		curl_easy_setopt(curl, CURLOPT_COOKIEJAR, cookieFile.c_str());
 	}
 
-	int code = 0;
+	long code = 0;
 	curl_easy_perform(curl);
 	curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &code);