From 4513e497542acb117d0bea041204728e6bfd7c65 Mon Sep 17 00:00:00 2001 From: phk Date: Mon, 20 Aug 2007 08:57:42 +0000 Subject: [PATCH] Use uppercase VBE prefix for VBE_new_bereq() and VBE_free_bereq() git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1869 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache.h | 4 ++-- varnish-cache/bin/varnishd/cache_backend.c | 10 ++++++++-- varnish-cache/bin/varnishd/cache_center.c | 6 +++--- varnish-cache/bin/varnishd/cache_http.c | 2 +- varnish-cache/bin/varnishd/cache_pipe.c | 2 +- 5 files changed, 15 insertions(+), 9 deletions(-) diff --git a/varnish-cache/bin/varnishd/cache.h b/varnish-cache/bin/varnishd/cache.h index ba6b426f..8c5e72b8 100644 --- a/varnish-cache/bin/varnishd/cache.h +++ b/varnish-cache/bin/varnishd/cache.h @@ -366,8 +366,8 @@ void VBE_Init(void); struct vbe_conn *VBE_GetFd(struct sess *sp); void VBE_ClosedFd(struct worker *w, struct vbe_conn *vc, int already); void VBE_RecycleFd(struct worker *w, struct vbe_conn *vc); -struct bereq *vbe_new_bereq(void); -void vbe_free_bereq(struct bereq *bereq); +struct bereq * VBE_new_bereq(void); +void VBE_free_bereq(struct bereq *bereq); /* cache_ban.c */ void AddBan(const char *, int hash); diff --git a/varnish-cache/bin/varnishd/cache_backend.c b/varnish-cache/bin/varnishd/cache_backend.c index ed2a23ef..744940aa 100644 --- a/varnish-cache/bin/varnishd/cache_backend.c +++ b/varnish-cache/bin/varnishd/cache_backend.c @@ -28,6 +28,12 @@ * * $Id$ * + * NB: This file is in transition: + * In the future it will contain the central part of the backend handling, + * refcounting, functions for DNS lookup and connection revalidation etc. + * The actual policies will be put in separate files, cache_backend_simple.c, + * cache_backend_round_robin.c etc etc. + * * Manage backend connections. * * XXX: When we switch VCL we can have vbe_conn's dangling from @@ -62,7 +68,7 @@ static MTX vbemtx; /*--------------------------------------------------------------------*/ struct bereq * -vbe_new_bereq(void) +VBE_new_bereq(void) { struct bereq *bereq; volatile unsigned len; @@ -91,7 +97,7 @@ vbe_new_bereq(void) /* XXX: no backpressure on pool size */ void -vbe_free_bereq(struct bereq *bereq) +VBE_free_bereq(struct bereq *bereq) { CHECK_OBJ_NOTNULL(bereq, BEREQ_MAGIC); diff --git a/varnish-cache/bin/varnishd/cache_center.c b/varnish-cache/bin/varnishd/cache_center.c index f0a21be9..f8fe5179 100644 --- a/varnish-cache/bin/varnishd/cache_center.c +++ b/varnish-cache/bin/varnishd/cache_center.c @@ -317,7 +317,7 @@ cnt_fetch(struct sess *sp) } - vbe_free_bereq(sp->bereq); + VBE_free_bereq(sp->bereq); sp->bereq = NULL; if (i) { @@ -590,7 +590,7 @@ cnt_miss(struct sess *sp) HSH_Unbusy(sp->obj); HSH_Deref(sp->obj); sp->obj = NULL; - vbe_free_bereq(sp->bereq); + VBE_free_bereq(sp->bereq); sp->bereq = NULL; sp->step = STP_ERROR; return (0); @@ -601,7 +601,7 @@ cnt_miss(struct sess *sp) HSH_Deref(sp->obj); sp->obj = NULL; sp->step = STP_PASS; - vbe_free_bereq(sp->bereq); + VBE_free_bereq(sp->bereq); sp->bereq = NULL; return (0); } diff --git a/varnish-cache/bin/varnishd/cache_http.c b/varnish-cache/bin/varnishd/cache_http.c index e4d87c93..6bb44934 100644 --- a/varnish-cache/bin/varnishd/cache_http.c +++ b/varnish-cache/bin/varnishd/cache_http.c @@ -787,7 +787,7 @@ http_FilterHeader(struct sess *sp, unsigned how) struct http *hp; char *b; - bereq = vbe_new_bereq(); + bereq = VBE_new_bereq(); AN(bereq); hp = bereq->http; hp->logtag = HTTP_Tx; diff --git a/varnish-cache/bin/varnishd/cache_pipe.c b/varnish-cache/bin/varnishd/cache_pipe.c index b8575c0c..d73b96f1 100644 --- a/varnish-cache/bin/varnishd/cache_pipe.c +++ b/varnish-cache/bin/varnishd/cache_pipe.c @@ -102,7 +102,7 @@ PipeSession(struct sess *sp) return; } - vbe_free_bereq(bereq); + VBE_free_bereq(bereq); bereq = NULL; sp->t_resp = TIM_real(); -- 2.39.5