Adjust to vmod function name changes in varnish-cache

parent 98401018
......@@ -112,7 +112,7 @@ tus_chksum_init(VRT_CTX) {
fprintf(stderr, "enabled %u\n", enabled);
#define HENUM(t, b) do { \
vmod_blobdigest->digest__init(ctx, &digest_ ## t, \
vmod_blobdigest->f_digest__init(ctx, &digest_ ## t, \
"tus_digest_" #t, *vmod_blobdigest->enum_ ## b, NULL, \
*vmod_blobdigest->enum_TASK); \
if (digest_ ## t == NULL) \
......@@ -139,7 +139,7 @@ tus_chksum_fini(VRT_CTX) {
(void) ctx;
#define HENUM(t, b) if (digest_ ## t != NULL) \
vmod_blobdigest->digest__fini(&digest_ ## t);
vmod_blobdigest->f_digest__fini(&digest_ ## t);
#include "tbl_hash_enum.h"
REPLACE(hashes, NULL);
if (dl_vmod_blob != NULL)
......@@ -164,10 +164,10 @@ tus_b64_decode(VRT_CTX, const char *s, VCL_INT l)
}
AN(vmod_blob);
AN(vmod_blob->decode);
AN(vmod_blob->f_decode);
AN(vmod_blob->enum_BASE64);
return (vmod_blob->decode(ctx, *vmod_blob->enum_BASE64, l, &st));
return (vmod_blob->f_decode(ctx, *vmod_blob->enum_BASE64, l, &st));
}
/* ------------------------------------------------------------
......@@ -273,7 +273,7 @@ tus_chksum_update(VRT_CTX, const struct tus_chksum *c,
b.len = l;
b.blob = ptr;
(void) vmod_blobdigest->digest_update(ctx, c->digest, &b);
(void) vmod_blobdigest->f_digest_update(ctx, c->digest, &b);
}
VCL_BLOB
......@@ -282,13 +282,16 @@ tus_chksum_final(VRT_CTX, struct tus_chksum *c)
AN(enabled);
if (c->final == NULL)
c->final = vmod_blobdigest->digest_final(ctx, c->digest);
c->final = vmod_blobdigest->f_digest_final(ctx, c->digest);
return (c->final);
}
VCL_BOOL
tus_chksum_equal(VRT_CTX, struct tus_chksum *c)
{
AN(vmod_blob);
AN(vmod_blob->f_equal);
(void) tus_chksum_final(ctx, c);
return (vmod_blob->equal(ctx, c->expect, c->final));
return (vmod_blob->f_equal(ctx, c->expect, c->final));
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment