From: phk Date: Fri, 27 Feb 2009 16:09:03 +0000 (+0000) Subject: Now that ESI parsing is not done while we execute vcl_fetch{}, the X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3193d7c9141d8550e5b3a96929d373e31079ba7;p=varnish Now that ESI parsing is not done while we execute vcl_fetch{}, the majority of the cache_vrt_esi.c file is no longer "VRT" relevant. Move the one function which is VRT to cache_vrt.c and rename cache_vrt_esi.c to cache_esi.c git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3839 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/Makefile.am b/varnish-cache/bin/varnishd/Makefile.am index 2c445fbd..4f6e7ac2 100644 --- a/varnish-cache/bin/varnishd/Makefile.am +++ b/varnish-cache/bin/varnishd/Makefile.am @@ -21,6 +21,7 @@ varnishd_SOURCES = \ cache_dir_random.c \ cache_dir_round_robin.c \ cache_dir_simple.c \ + cache_esi.c \ cache_expire.c \ cache_fetch.c \ cache_hash.c \ @@ -36,7 +37,6 @@ varnishd_SOURCES = \ cache_vary.c \ cache_vcl.c \ cache_vrt.c \ - cache_vrt_esi.c \ cache_vrt_re.c \ cache_ws.c \ hash_classic.c \ diff --git a/varnish-cache/bin/varnishd/cache_vrt_esi.c b/varnish-cache/bin/varnishd/cache_esi.c similarity index 98% rename from varnish-cache/bin/varnishd/cache_vrt_esi.c rename to varnish-cache/bin/varnishd/cache_esi.c index 7bf3c935..48c807d7 100644 --- a/varnish-cache/bin/varnishd/cache_vrt_esi.c +++ b/varnish-cache/bin/varnishd/cache_esi.c @@ -636,22 +636,6 @@ parse_esi_tag(struct esi_work *ew, int closing) /*--------------------------------------------------------------------*/ -void -VRT_ESI(struct sess *sp) -{ - CHECK_OBJ_NOTNULL(sp->bereq, BEREQ_MAGIC); - - if (sp->cur_method != VCL_MET_FETCH) { - /* XXX: we should catch this at compile time */ - WSP(sp, SLT_VCL_error, - "esi can only be called from vcl_fetch"); - return; - } - - sp->bereq->do_esi = 1; -} - - void ESI_Parse(struct sess *sp) { diff --git a/varnish-cache/bin/varnishd/cache_vrt.c b/varnish-cache/bin/varnishd/cache_vrt.c index 20be6e35..7d90fdbd 100644 --- a/varnish-cache/bin/varnishd/cache_vrt.c +++ b/varnish-cache/bin/varnishd/cache_vrt.c @@ -776,6 +776,23 @@ VRT_Rollback(struct sess *sp) /*--------------------------------------------------------------------*/ +void +VRT_ESI(struct sess *sp) +{ + CHECK_OBJ_NOTNULL(sp->bereq, BEREQ_MAGIC); + + if (sp->cur_method != VCL_MET_FETCH) { + /* XXX: we should catch this at compile time */ + WSP(sp, SLT_VCL_error, + "esi can only be called from vcl_fetch"); + return; + } + + sp->bereq->do_esi = 1; +} + +/*--------------------------------------------------------------------*/ + /*lint -e{818} sp could be const */ void VRT_panic(struct sess *sp, const char *str, ...)