Commit 0fe9fb93 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Clarifying comments, and move a function call to a more natural location.

parent 9ea98257
......@@ -51,7 +51,7 @@ static VTAILQ_HEAD(, backend) backends = VTAILQ_HEAD_INITIALIZER(backends);
static struct lock backends_mtx;
/*--------------------------------------------------------------------
* Create/Delete a new director::backend instance.
* Create a new static or dynamic director::backend instance.
*/
struct director *
......@@ -117,6 +117,11 @@ VRT_new_backend(VRT_CTX, const struct vrt_backend *vrt)
return (b->director);
}
/*--------------------------------------------------------------------
* Delete a dynamic director::backend instance. Undeleted dynamic and
* static instances are GC'ed when the VCL is discarded (in cache_vcl.c)
*/
void
VRT_delete_backend(VRT_CTX, struct director **dp)
{
......@@ -130,6 +135,7 @@ VRT_delete_backend(VRT_CTX, struct director **dp)
CHECK_OBJ_NOTNULL(d, DIRECTOR_MAGIC);
CAST_OBJ_NOTNULL(be, d->priv, BACKEND_MAGIC);
VCL_DelBackend(ctx->vcl, be);
VBE_Delete(be);
}
/*---------------------------------------------------------------------
......
......@@ -210,7 +210,6 @@ VCL_DelBackend(struct vcl *vcl, struct backend *be)
Lck_Lock(&vcl_mtx);
VTAILQ_REMOVE(&vcl->backend_list, be, vcl_list);
Lck_Unlock(&vcl_mtx);
VBE_Delete(be);
}
static void
......
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