engines/http: set FIO_SYNCIO flag
[fio.git] / engines / http.c
index 93fcd0d8e44a5528a4e36879bbd75af9afe9904e..275fcab561048f9e81908863cbda3366c28b73b1 100644 (file)
@@ -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));
@@ -294,9 +296,11 @@ static int _curl_trace(CURL *handle, curl_infotype type,
 
        switch (type) {
        case CURLINFO_TEXT:
-       fprintf(stderr, "== Info: %s", data);
+               fprintf(stderr, "== Info: %s", data);
+               /* fall through */
        default:
        case CURLINFO_SSL_DATA_OUT:
+               /* fall through */
        case CURLINFO_SSL_DATA_IN:
                return 0;
 
@@ -638,7 +642,7 @@ static int fio_http_invalidate(struct thread_data *td, struct fio_file *f)
 static struct ioengine_ops ioengine = {
        .name = "http",
        .version                = FIO_IOOPS_VERSION,
-       .flags                  = FIO_DISKLESSIO,
+       .flags                  = FIO_DISKLESSIO | FIO_SYNCIO,
        .setup                  = fio_http_setup,
        .queue                  = fio_http_queue,
        .getevents              = fio_http_getevents,