X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=engines%2Fhttp.c;h=d81e4288ff7bfdec000781240cea3aafa687ca88;hb=c21198d9cd52b6239c8f9de2373574a7683a0593;hp=cb66ebe663ee7d28cbd06b0e4fc1e06049066bbb;hpb=c74cb68a1c13077222471e77f4715e0521cb4ed0;p=fio.git diff --git a/engines/http.c b/engines/http.c index cb66ebe6..d81e4288 100644 --- a/engines/http.c +++ b/engines/http.c @@ -273,6 +273,8 @@ static void _hmac(unsigned char *md, void *key, int key_len, char *data) { ctx = HMAC_CTX_new(); #else ctx = &_ctx; + /* work-around crash in certain versions of libssl */ + HMAC_CTX_init(ctx); #endif HMAC_Init_ex(ctx, key, key_len, EVP_sha256(), NULL); HMAC_Update(ctx, (unsigned char*)data, strlen(data)); @@ -546,7 +548,7 @@ static enum fio_q_status fio_http_queue(struct thread_data *td, } else if (io_u->ddir == DDIR_TRIM) { curl_easy_setopt(http->curl, CURLOPT_HTTPGET, 1L); curl_easy_setopt(http->curl, CURLOPT_CUSTOMREQUEST, "DELETE"); - curl_easy_setopt(http->curl, CURLOPT_INFILESIZE_LARGE, 0); + curl_easy_setopt(http->curl, CURLOPT_INFILESIZE_LARGE, (curl_off_t)0); curl_easy_setopt(http->curl, CURLOPT_READDATA, NULL); curl_easy_setopt(http->curl, CURLOPT_WRITEDATA, NULL); res = curl_easy_perform(http->curl); @@ -608,7 +610,7 @@ static int fio_http_setup(struct thread_data *td) } curl_easy_setopt(http->curl, CURLOPT_READFUNCTION, _http_read); curl_easy_setopt(http->curl, CURLOPT_WRITEFUNCTION, _http_write); - curl_easy_setopt(http->curl, CURLOPT_SEEKFUNCTION, _http_seek); + curl_easy_setopt(http->curl, CURLOPT_SEEKFUNCTION, &_http_seek); if (o->user && o->pass) { curl_easy_setopt(http->curl, CURLOPT_USERNAME, o->user); curl_easy_setopt(http->curl, CURLOPT_PASSWORD, o->pass);