Commit 72494d82 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Use proper tests instead of asserts.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@4465 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent d29a380d
......@@ -337,18 +337,25 @@ varnish_start(struct varnish *v)
if (vtc_error)
return;
vtc_log(v->vl, 2, "Start");
u = varnish_ask_cli(v, "start", NULL);
u = varnish_ask_cli(v, "start", &resp);
if (vtc_error)
return;
assert(u == CLIS_OK);
u = varnish_ask_cli(v, "debug.xid 1000", NULL);
if (u != CLIS_OK)
vtc_log(v->vl, 0, "CLI start command failed: %u %s", u, resp);
free(resp);
u = varnish_ask_cli(v, "debug.xid 1000", &resp);
if (vtc_error)
return;
assert(u == CLIS_OK);
if (u != CLIS_OK)
vtc_log(v->vl, 0, "CLI debug.xid command failed: %u %s",
u, resp);
free(resp);
u = varnish_ask_cli(v, "debug.listen_address", &resp);
if (vtc_error)
return;
assert(u == CLIS_OK);
if (u != CLIS_OK)
vtc_log(v->vl, 0,
"CLI debug.listen_address command failed: %u %s", u, resp);
h = resp;
p = strchr(h, ' ');
AN(p);
......
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