In the DNS director I need to be able to set a TTL for caching dns. Since
this is set when the director is parsed, it's not relative to anything. For
this, I've used TimeUnit(), which does exactly what I need. However, as
that's a static function I either need to wrap it, rename it or find some
better alternative.

Am I missing something obvious here? I'm assuming I am since I'm not very
friendly with the VCC.

I'm attaching the "patch" (if you can call it that) that I use in the dns
director right now, which does the trick (I added the prototype in the
relevant .c-files temporarily):

diff --git a/varnish-cache/lib/libvcl/vcc_parse.c 
b/varnish-cache/lib/libvcl/vcc_parse.c
index 36fec17..7e669b8 100644
--- a/varnish-cache/lib/libvcl/vcc_parse.c
+++ b/varnish-cache/lib/libvcl/vcc_parse.c
@@ -63,7 +63,7 @@ static void Cond_0(struct tokenlist *tl);
  * Recognize and convert units of time, return seconds.
  */
 
-static double
+double
 TimeUnit(struct tokenlist *tl)
 {
        double sc = 1.0;


-- 
Kristian

Attachment: pgpbV7LIgl570.pgp
Description: PGP signature

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

Reply via email to