commit 25d3873833ca6e0f4bcd46efd59f6955228bfabf
Author: Geoff Simmons <geoff@uplex.de>
Date: Thu Dec 10 11:32:42 2020 +0100
Adjust to vmod_priv methods.
Required for Varnish as of commit 681c11998ec56dc4460a30585210f95a7850ea3b
diff --git a/src/vmod_uuid.c b/src/vmod_uuid.c
index 60d6928..3da20ab 100644
--- a/src/vmod_uuid.c
+++ b/src/vmod_uuid.c
@@ -112,6 +112,12 @@ free_uuids(void *priv)
uuid_destroy(uuids[1]);
}
+static const struct vmod_priv_methods uuid_priv_task_methods[1] = {{
+ .magic = VMOD_PRIV_METHODS_MAGIC,
+ .type = "vmod_uuid_priv_task",
+ .fini = free_uuids
+}};
+
static inline uuid_t *
get_uuids(VRT_CTX, struct vmod_priv *priv, uuid_t **uuid_ns)
{
@@ -130,7 +136,7 @@ get_uuids(VRT_CTX, struct vmod_priv *priv, uuid_t **uuid_ns)
return NULL;
}
priv->priv = uuids;
- priv->free = free_uuids;
+ priv->methods = uuid_priv_task_methods;
uuids[0] = NULL;
uuids[1] = NULL;
UUID_CALL(rc, ctx, uuid_create(&uuid), NULL);