kore

Kore is a web application platform for writing scalable, concurrent web based processes in C or Python.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit 3299f60df402799e4dc454fccd2063867ad9d1d3
parent 503f42074c1e031d6b88ee0cc988622c158f6155
Author: Joris Vink <joris@coders.se>
Date:   Sun,  5 May 2019 21:16:42 +0200

tiny curl fixes.

Diffstat:
include/kore/curl.h | 3+--
src/curl.c | 9+++++----
2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/kore/curl.h b/include/kore/curl.h @@ -28,7 +28,6 @@ extern "C" { #define KORE_CURL_TIMEOUT 60 #define KORE_CURL_RECV_MAX (1024 * 1024 * 2) -#define KORE_CURL_STATUS_UNKNOWN 0 #define KORE_CURL_FLAG_HTTP_PARSED_HEADERS 0x0001 #define KORE_CURL_FLAG_BOUND 0x0002 @@ -52,7 +51,7 @@ struct kore_curl { /* For the simplified HTTP api. */ struct { - int status; + long status; struct curl_slist *hdrlist; struct kore_buf *tosend; diff --git a/src/curl.c b/src/curl.c @@ -332,10 +332,10 @@ kore_curl_http_setup(struct kore_curl *client, int method, const void *data, if (has_body) { if (method == HTTP_METHOD_PUT) { curl_easy_setopt(client->handle, - CURLOPT_INFILESIZE_LARGE, len); + CURLOPT_INFILESIZE_LARGE, (curl_off_t)len); } else { curl_easy_setopt(client->handle, - CURLOPT_POSTFIELDSIZE_LARGE, len); + CURLOPT_POSTFIELDSIZE_LARGE, (curl_off_t)len); } } else { if (data != NULL || len != 0) { @@ -432,7 +432,7 @@ curl_socket(CURL *easy, curl_socket_t fd, int action, void *arg, void *sock) client = NULL; - res = curl_easy_getinfo(easy, CURLINFO_PRIVATE, &client); + res = curl_easy_getinfo(easy, CURLINFO_PRIVATE, (char **)&client); if (res != CURLE_OK) fatal("curl_easy_getinfo: %s", curl_easy_strerror(res)); @@ -503,7 +503,8 @@ curl_process(void) handle = msg->easy_handle; - res = curl_easy_getinfo(handle, CURLINFO_PRIVATE, &client); + res = curl_easy_getinfo(handle, CURLINFO_PRIVATE, + (char **)&client); if (res != CURLE_OK) fatal("curl_easy_getinfo: %s", curl_easy_strerror(res));