kore

An easy to use, scalable and secure web application framework for writing web APIs in C.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit cf028f20b6b9c526ad792a08b21b04e3eac8c254
parent 3b7d8b29e64973f6c644bc3a43e9469073c72a51
Author: Joris Vink <joris@coders.se>
Date:   Thu,  2 Apr 2015 13:45:42 +0200

Rename kore_auth() to kore_auth_run().

Diffstat:
includes/kore.h | 6+++---
src/auth.c | 6+++---
src/http.c | 4++--
3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/includes/kore.h b/includes/kore.h @@ -402,9 +402,9 @@ void kore_accesslog_init(void); int kore_accesslog_wait(void); void kore_accesslog_worker_init(void); -int kore_auth(struct http_request *, struct kore_auth *); -void kore_auth_init(void); -int kore_auth_new(const char *); +int kore_auth_run(struct http_request *, struct kore_auth *); +void kore_auth_init(void); +int kore_auth_new(const char *); struct kore_auth *kore_auth_lookup(const char *); int kore_ssl_sni_cb(SSL *, int *, void *); diff --git a/src/auth.c b/src/auth.c @@ -54,7 +54,7 @@ kore_auth_new(const char *name) } int -kore_auth(struct http_request *req, struct kore_auth *auth) +kore_auth_run(struct http_request *req, struct kore_auth *auth) { int r; @@ -77,7 +77,7 @@ kore_auth(struct http_request *req, struct kore_auth *auth) switch (r) { case KORE_RESULT_OK: - kore_debug("kore_auth() for %s successful", req->path); + kore_debug("kore_auth_run() for %s successful", req->path); /* FALLTHROUGH */ case KORE_RESULT_RETRY: return (r); @@ -89,7 +89,7 @@ kore_auth(struct http_request *req, struct kore_auth *auth) if (auth->type == KORE_AUTH_TYPE_REQUEST) return (r); - kore_debug("kore_auth() for %s failed", req->path); + kore_debug("kore_auth_run() for %s failed", req->path); if (auth->redirect == NULL) { http_response(req, 403, NULL, 0); diff --git a/src/http.c b/src/http.c @@ -262,7 +262,7 @@ http_process_request(struct http_request *req, int retry_only) r = http_generic_404(req); } else { if (req->hdlr != hdlr && hdlr->auth != NULL) - r = kore_auth(req, hdlr->auth); + r = kore_auth_run(req, hdlr->auth); else r = KORE_RESULT_OK; @@ -279,7 +279,7 @@ http_process_request(struct http_request *req, int retry_only) case KORE_RESULT_ERROR: /* * Set r to KORE_RESULT_OK so we can properly - * flush the result from kore_auth(). + * flush the result from kore_auth_run(). */ r = KORE_RESULT_OK; break;