Hi all,

I'm working on a VMOD (VC 4.1) and I would like to create a simple function 
able to return string values. You can think these strings as values of 
variables previously set somewhere else (e.g. environment variables) and used 
during vcl_init to make some decisions.

This would be trivial stuff outside of vcl_init (i.e. return WS_Copy(ctx->ws, 
"whatever", -1)), but ctx->ws is not available during vcl_init. Is there any 
friendly alternative not requiring the VMOD doing explicit mallocs when 
returning strings, keeping track of returned pointers, and releasing them when 
execution of vcl_init is completed?

Thanks,

--
Carlos Abalde


_______________________________________________
varnish-dev mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev

Reply via email to