kore

Kore is a web application platform for writing scalable, concurrent web based processes in C or Python.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit cb3322cd9f2fb239185c610e5b2ffc50e4083cd3
parent 3f853a79ce07b350afc3be4a8208099f086ebb4e
Author: Joris Vink <joris@coders.se>
Date:   Wed, 30 Jul 2014 09:11:21 +0200

Make accesslogs optional

Diffstat:
includes/kore.h | 1+
src/http.c | 4+++-
src/module.c | 1+
3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/includes/kore.h b/includes/kore.h @@ -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; diff --git a/src/http.c b/src/http.c @@ -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; } diff --git a/src/module.c b/src/module.c @@ -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;