From: phk Date: Mon, 21 Aug 2006 19:05:57 +0000 (+0000) Subject: Add asserts. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f847245f946a97addb5e4a0f692b88258e7de4be;p=varnish Add asserts. Return if we pass on directly. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@876 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_acceptor.c b/varnish-cache/bin/varnishd/cache_acceptor.c index 9f191975..9051eca1 100644 --- a/varnish-cache/bin/varnishd/cache_acceptor.c +++ b/varnish-cache/bin/varnishd/cache_acceptor.c @@ -161,11 +161,15 @@ vca_return_session(struct sess *sp) { CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); + assert(sp->obj == NULL); + assert(sp->vcl == NULL); if (sp->fd >= 0) { VSL(SLT_SessionReuse, sp->fd, "%s %s", sp->addr, sp->port); (void)clock_gettime(CLOCK_REALTIME, &sp->t_open); - if (http_RecvPrepAgain(sp->http)) + if (http_RecvPrepAgain(sp->http)) { vca_handover(sp, 0); + return; + } } vca_acceptors[0]->recycle(sp); }