Make accesslogs optional

This commit is contained in:
Joris Vink 2014-07-30 09:11:21 +02:00
parent 3f853a79ce
commit cb3322cd9f
3 changed files with 5 additions and 1 deletions

View File

@ -228,6 +228,7 @@ struct kore_module_handle {
int type;
int errors;
regex_t rctx;
struct kore_domain *dom;
struct kore_auth *auth;
TAILQ_HEAD(, kore_handler_params) params;

View File

@ -273,7 +273,9 @@ http_process_request(struct http_request *req, int retry_only)
return;
}
kore_accesslog(req);
if (hdlr != NULL && hdlr->dom->accesslog != -1)
kore_accesslog(req);
req->flags |= HTTP_REQUEST_DELETE;
}

View File

@ -179,6 +179,7 @@ kore_module_handler_new(char *path, char *domain, char *func,
hdlr = kore_malloc(sizeof(*hdlr));
hdlr->auth = ap;
hdlr->dom = dom;
hdlr->errors = 0;
hdlr->addr = addr;
hdlr->type = type;