Compatibility with current vmod_blobdigest

as of efa1e7d64f8b1a17a02a9fd30df606804ba40a3b
parent d5752e2e
......@@ -8,7 +8,7 @@ bin_PROGRAMS = vmod_get_h
vmod_get_h_SOURCES = \
vmod_get_h.c
vmod_get_h_LDFLAGS = -rdynamic
vmod_get_h_LDFLAGS = -rdynamic $(VARNISHAPI_LIBS)
vmod_get_h_LDADD = -ldl
TESTS = \
......
/*-
* Copyright 2020 UPLEX Nils Goroll Systemoptimierung
* Copyright 2020-2023 UPLEX Nils Goroll Systemoptimierung
* All rights reserved.
*
* Author: Nils Goroll <nils.goroll@uplex.de>
......@@ -264,6 +264,7 @@ tus_chksum_update(VRT_CTX, const struct tus_chksum *c,
const void *ptr, size_t l)
{
struct vrt_blob b;
struct arg_vmod_blobdigest_digest_update a[1] = {{0}};
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
CHECK_OBJ_NOTNULL(c, VMOD_TUS_CHKSUM_MAGIC);
......@@ -273,7 +274,10 @@ tus_chksum_update(VRT_CTX, const struct tus_chksum *c,
b.len = l;
b.blob = ptr;
(void) vmod_blobdigest->f_digest_update(ctx, c->digest, &b);
a->valid_msg = 1;
a->msg = &b;
(void) vmod_blobdigest->f_digest_update(ctx, c->digest, a);
}
VCL_BLOB
......
......@@ -31,12 +31,16 @@
#include <dlfcn.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <unistd.h>
#include <string.h>
#include "vdef.h"
#include "vrt.h"
#include "cache/cache.h"
#include "vas.h"
// provide symbols from varnish-cache used by vmods
const struct body_status BS_NONE[1];
const struct body_status BS_TAKEN[1];
const struct body_status BS_ERROR[1];
const struct vrt_blob *vrt_null_blob = &(struct vrt_blob){
.type = VRT_NULL_BLOB_TYPE,
......
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