Commit c30e3808 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Magic check on struct vbe


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@537 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 5ec6ed3f
......@@ -312,12 +312,14 @@ VBE_GetFd(struct backend *bp, unsigned xid)
if (vp == NULL) {
vp = calloc(sizeof *vp, 1);
assert(vp != NULL);
vp->magic = VBE_MAGIC;
TAILQ_INIT(&vp->fconn);
TAILQ_INIT(&vp->bconn);
vp->ip = bp->ip;
bp->vbe = vp;
TAILQ_INSERT_TAIL(&vbe_head, vp, list);
}
} else
CHECK_OBJ(vp, VBE_MAGIC);
/* XXX: check nconn vs backend->maxcon */
vc = TAILQ_FIRST(&vp->fconn);
if (vc != NULL) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment