parent daa719ba
...@@ -315,6 +315,12 @@ tus_task_free(void *ptr) ...@@ -315,6 +315,12 @@ tus_task_free(void *ptr)
r->fcore = NULL; r->fcore = NULL;
} }
static const struct vmod_priv_methods priv_task_methods[1] = {{
.magic = VMOD_PRIV_METHODS_MAGIC,
.type = "vmod_tus_priv_task",
.fini = tus_task_free
}};
struct tus_response * struct tus_response *
tus_task_new(VRT_CTX, struct VPFX(tus_server) *tussrv) tus_task_new(VRT_CTX, struct VPFX(tus_server) *tussrv)
{ {
...@@ -340,7 +346,7 @@ tus_task_new(VRT_CTX, struct VPFX(tus_server) *tussrv) ...@@ -340,7 +346,7 @@ tus_task_new(VRT_CTX, struct VPFX(tus_server) *tussrv)
} }
INIT_OBJ(r, VMOD_TUS_RESPONSE_MAGIC); INIT_OBJ(r, VMOD_TUS_RESPONSE_MAGIC);
task->priv = r; task->priv = r;
task->free = tus_task_free; task->methods = priv_task_methods;
return (r); return (r);
} }
......
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