From a3193d7c9141d8550e5b3a96929d373e31079ba7 Mon Sep 17 00:00:00 2001 From: phk Date: Fri, 27 Feb 2009 16:09:03 +0000 Subject: [PATCH] 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 --- varnish-cache/bin/varnishd/Makefile.am | 2 +- .../varnishd/{cache_vrt_esi.c => cache_esi.c} | 16 ---------------- varnish-cache/bin/varnishd/cache_vrt.c | 17 +++++++++++++++++ 3 files changed, 18 insertions(+), 17 deletions(-) rename varnish-cache/bin/varnishd/{cache_vrt_esi.c => cache_esi.c} (98%) 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, ...) -- 2.39.5