Commit 96501efa authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Use VRT_BACKEND_string() to get name of backends.

parent b5737297
......@@ -255,8 +255,9 @@ shardcfg_hashcircle(struct sharddir *shardd, VCL_INT replicas)
ident = shardd->backend[i].ident
? shardd->backend[i].ident
: shardd->backend[i].backend->vcl_name;
: VRT_BACKEND_string(shardd->backend[i].backend);
AN(ident);
assert(ident[0] != '\0');
for (j = 0; j < replicas; j++) {
......@@ -325,11 +326,13 @@ shardcfg_backend_cmp(const struct shard_backend *a,
return a->backend != b->backend;
if (ai == NULL)
ai = a->backend->vcl_name;
ai = VRT_BACKEND_string(a->backend);
if (bi == NULL)
bi = b->backend->vcl_name;
bi = VRT_BACKEND_string(b->backend);
AN(ai);
AN(bi);
return strcmp(ai, bi);
}
......@@ -549,7 +552,7 @@ shardcfg_apply_change(VRT_CTX, struct sharddir *shardd,
shard_err(ctx, shardd, "(notice) backend %s%s%s "
"already exists - skipping",
b->backend->vcl_name,
VRT_BACKEND_string(b->backend),
ident ? "/" : "",
ident ? ident : "");
break;
......
......@@ -115,7 +115,7 @@ vdir_add_backend(VRT_CTX, struct vdir *vd, VCL_BACKEND be, double weight)
CHECK_OBJ_NOTNULL(vd, VDIR_MAGIC);
if (be == NULL) {
VRT_fail(ctx, "%s: NULL backend cannot be added",
vd->dir->vcl_name);
VRT_BACKEND_string(vd->dir));
return;
}
AN(be);
......@@ -139,7 +139,7 @@ vdir_remove_backend(VRT_CTX, struct vdir *vd, VCL_BACKEND be, unsigned *cur)
CHECK_OBJ_NOTNULL(vd, VDIR_MAGIC);
if (be == NULL) {
VRT_fail(ctx, "%s: NULL backend cannot be removed",
vd->dir->vcl_name);
VRT_BACKEND_string(vd->dir));
return;
}
CHECK_OBJ(be, DIRECTOR_MAGIC);
......
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