From: phk Date: Mon, 8 Oct 2007 15:34:32 +0000 (+0000) Subject: Don't use vca_return_session() when we can SES_Delete() X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3f3eb38baab72b8b7c824d8b69635cc5b1edf66;p=varnish Don't use vca_return_session() when we can SES_Delete() git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2093 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_acceptor.c b/varnish-cache/bin/varnishd/cache_acceptor.c index bfb62e9a..501a5cf5 100644 --- a/varnish-cache/bin/varnishd/cache_acceptor.c +++ b/varnish-cache/bin/varnishd/cache_acceptor.c @@ -246,10 +246,8 @@ vca_return_session(struct sess *sp) CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); AZ(sp->obj); AZ(sp->vcl); - if (sp->fd < 0) - SES_Delete(sp); - else - assert(sizeof sp == write(vca_pipes[1], &sp, sizeof sp)); + assert(sp->fd >= 0); + assert(sizeof sp == write(vca_pipes[1], &sp, sizeof sp)); } diff --git a/varnish-cache/bin/varnishd/cache_center.c b/varnish-cache/bin/varnishd/cache_center.c index 772ddc6c..645ed04a 100644 --- a/varnish-cache/bin/varnishd/cache_center.c +++ b/varnish-cache/bin/varnishd/cache_center.c @@ -217,7 +217,7 @@ cnt_done(struct sess *sp) VSL_stats->sess_closed++; assert(!isnan(sp->wrk->used)); sp->wrk = NULL; - vca_return_session(sp); + SES_Delete(sp); return (1); } diff --git a/varnish-cache/bin/varnishd/cache_pool.c b/varnish-cache/bin/varnishd/cache_pool.c index 7302e84d..97388eec 100644 --- a/varnish-cache/bin/varnishd/cache_pool.c +++ b/varnish-cache/bin/varnishd/cache_pool.c @@ -313,7 +313,7 @@ WRK_QueueSession(struct sess *sp) UNLOCK(&tmtx); sp->t_end = TIM_real(); vca_close_session(sp, "dropped"); - vca_return_session(sp); + SES_Delete(sp); return; } /*