acceptor: Improve error reporting

Include the socket name and make the code more readable by using struct members
instead of av[]
parent f52e7c3f
......@@ -149,10 +149,14 @@ VCA_Arg(const char *spec)
AN(vca);
error = vca->open(av + 2, la, &err);
if (error)
ARGV_ERR("Got no socket(s) for %s (%s)\n", av[1], err);
else if (VTAILQ_EMPTY(&la->socks))
ARGV_ERR("Got no socket(s) for %s\n", av[1]);
if (error) {
ARGV_ERR("Got no socket(s) for %s=%s (%s)\n",
la->name, la->endpoint, err);
}
else if (VTAILQ_EMPTY(&la->socks)) {
ARGV_ERR("Got no socket(s) for %s=%s\n",
la->name, la->endpoint);
}
VAV_Free(av);
}
......
......@@ -87,5 +87,5 @@ varnish v1 -errvcl {Backend path: The empty abstract socket name is not supporte
}
}
shell -err -expect "Error: Got no socket(s) for @ (The empty abstract socket name is not supported)" \
shell -err -expect "Error: Got no socket(s) for a0=@ (The empty abstract socket name is not supported)" \
"varnishd -n ${tmpdir}/v0 -a @ -b None"
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