Commit 6734c868 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Clear the poll structure beforehand in order to make sure there

are no lingering bits.

Convert an assert to a failure.
parent b99540df
......@@ -899,8 +899,9 @@ cmd_http_send(CMD_ARGS)
AZ(av[2]);
vtc_dump(hp->vl, 4, "send", av[1], -1);
i = write(hp->fd, av[1], strlen(av[1]));
assert(i == strlen(av[1]));
if (i != strlen(av[1]))
vtc_log(hp->vl, 0, "Write error in http_send(): %s",
strerror(errno));
}
/**********************************************************************
......
......@@ -349,6 +349,7 @@ varnish_launch(struct varnish *v)
AZ(pthread_create(&v->tp_vsl, NULL, varnishlog_thread, v));
/* Wait for the varnish to call home */
memset(fd, 0, sizeof fd);
fd[0].fd = v->cli_fd;
fd[0].events = POLLIN;
fd[1].fd = v->fds[0];
......
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