Skip to content
This repository has been archived by the owner on Jul 30, 2021. It is now read-only.

Commit

Permalink
Rename VRT_fini_vbe() to VRT_delete_backen()
Browse files Browse the repository at this point in the history
  • Loading branch information
bsdphk committed Jun 17, 2015
1 parent 1b4695e commit 28bdbcc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
6 changes: 2 additions & 4 deletions bin/varnishd/cache/cache_backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ VRT_event_vbe(VRT_CTX, enum vcl_event_e ev, const struct director *d,
}

void
VRT_fini_vbe(VRT_CTX, struct director **dp, const struct vrt_backend *vrt)
VRT_delete_backend(VRT_CTX, struct director **dp)
{
struct director *d;
struct backend *be;
Expand All @@ -371,15 +371,13 @@ VRT_fini_vbe(VRT_CTX, struct director **dp, const struct vrt_backend *vrt)
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
AN(dp);
AN(*dp);
CHECK_OBJ_NOTNULL(vrt, VRT_BACKEND_MAGIC);

d = *dp;
*dp = NULL;
CHECK_OBJ_NOTNULL(d, DIRECTOR_MAGIC);
assert(d->priv2 == vrt);
CAST_OBJ_NOTNULL(be, d->priv, BACKEND_MAGIC);

if (vrt->probe != NULL)
if (be->probe != NULL)
VBP_Remove(be);

VBE_DeleteBackend(be);
Expand Down
2 changes: 1 addition & 1 deletion include/vrt.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ struct director *VRT_new_backend(VRT_CTX, const struct vrt_backend *);
void VRT_event_vbe(VRT_CTX, enum vcl_event_e, const struct director *,
const struct vrt_backend *);
#endif
void VRT_fini_vbe(VRT_CTX, struct director **, const struct vrt_backend *);
void VRT_delete_backend(VRT_CTX, struct director **);

/* Suckaddr related */
int VRT_VSA_GetPtr(const struct suckaddr *sua, const unsigned char ** dst);
Expand Down
3 changes: 1 addition & 2 deletions lib/libvcc/vcc_backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,7 @@ vcc_ParseHostDef(struct vcc *tl, const struct token *t_be, const char *vgcname)
"\t%s =\n\t VRT_new_backend(ctx, &vgc_dir_priv_%s);",
vgcname, vgcname);
VSB_printf(ifp->fin,
"\t\tVRT_fini_vbe(ctx, &%s,\n\t\t &vgc_dir_priv_%s);",
vgcname, vgcname);
"\t\tVRT_delete_backend(ctx, &%s);\n", vgcname);
VSB_printf(ifp->event,
"\tVRT_event_vbe(ctx, ev, %s, &vgc_dir_priv_%s);",
vgcname, vgcname);
Expand Down

0 comments on commit 28bdbcc

Please sign in to comment.