mirror of https://git.kore.io/kore.git
tiny curl fixes.
This commit is contained in:
parent
503f42074c
commit
3299f60df4
|
@ -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;
|
||||
|
|
|
@ -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));
|
||||
|
||||
|
|
Loading…
Reference in New Issue