move vhost_should_log call to server.c

log.o is linked to some regress/ stuff.  Calling from there a vhost_*
function means that we should link the regress/stuff to server.o too
(and that would pull in other stuff...).  Moving the call is easier,
and also probably better.
This commit is contained in:
Omar Polo 2021-02-22 09:19:14 +00:00
parent 793835cb26
commit 4604dc9671
No known key found for this signature in database
GPG Key ID: 35F98C96A1786F0D
2 changed files with 2 additions and 4 deletions

3
log.c
View File

@ -188,9 +188,6 @@ log_request(struct client *c, char *meta, size_t l)
size_t len;
int ec;
if (vhost_disable_log(c->host, c->iri.path))
return;
len = sizeof(c->addr);
ec = getnameinfo((struct sockaddr*)&c->addr, len,
hbuf, sizeof(hbuf),

View File

@ -620,7 +620,8 @@ handle_start_reply(int fd, short ev, void *d)
return;
}
log_request(c, buf, sizeof(buf));
if (!vhost_disable_log(c->host, c->iri.path))
log_request(c, buf, sizeof(buf));
if (c->code != SUCCESS)
close_conn(fd, ev, c);