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 7b9b1d5c2c467656b41372c7094b25115e1ef01f
parent 31eac77cd2b55b2b946c6f0e7d5780f2424f91a2
Author: Joris Vink <joris@coders.se>
Date:   Mon,  4 Aug 2014 12:40:21 +0200

sprinkle more const chars

Diffstat:
includes/kore.h | 23+++++++++++++----------
src/auth.c | 4++--
src/module.c | 10+++++-----
src/pool.c | 3++-
src/utils.c | 2+-
src/validator.c | 6+++---
6 files changed, 26 insertions(+), 22 deletions(-)

diff --git a/includes/kore.h b/includes/kore.h @@ -363,8 +363,8 @@ void kore_accesslog_worker_init(void); int kore_auth(struct http_request *, struct kore_auth *); void kore_auth_init(void); -int kore_auth_new(char *); -struct kore_auth *kore_auth_lookup(char *); +int kore_auth_new(const char *); +struct kore_auth *kore_auth_lookup(const char *); int kore_ssl_sni_cb(SSL *, int *, void *); int kore_server_bind(const char *, const char *); @@ -396,7 +396,7 @@ void explicit_bzero(void *, size_t); void *kore_pool_get(struct kore_pool *); void kore_pool_put(struct kore_pool *, void *); -void kore_pool_init(struct kore_pool *, char *, +void kore_pool_init(struct kore_pool *, const char *, u_int32_t, u_int32_t); time_t kore_date_to_time(char *); @@ -420,20 +420,23 @@ void kore_module_reload(int); void kore_module_onload(void); int kore_module_loaded(void); void kore_domain_closelogs(void); -void *kore_module_getsym(char *); -void kore_module_load(char *, char *); +void *kore_module_getsym(const char *); +void kore_module_load(const char *, const char *); void kore_domain_sslstart(struct kore_domain *); -int kore_module_handler_new(char *, char *, char *, char *, int); +int kore_module_handler_new(const char *, const char *, + const char *, const char *, int); + struct kore_domain *kore_domain_lookup(const char *); -struct kore_module_handle *kore_module_handler_find(char *, char *); +struct kore_module_handle *kore_module_handler_find(const char *, + const char *); void kore_validator_init(void); void kore_validator_reload(void); -int kore_validator_add(char *, u_int8_t, char *); -int kore_validator_run(struct http_request *, char *, char *); +int kore_validator_add(const char *, u_int8_t, const char *); +int kore_validator_run(struct http_request *, const char *, char *); int kore_validator_check(struct http_request *, struct kore_validator *, void *); -struct kore_validator *kore_validator_lookup(char *); +struct kore_validator *kore_validator_lookup(const char *); void fatal(const char *, ...); void kore_debug_internal(char *, int, const char *, ...); diff --git a/src/auth.c b/src/auth.c @@ -34,7 +34,7 @@ kore_auth_init(void) } int -kore_auth_new(char *name) +kore_auth_new(const char *name) { struct kore_auth *auth; @@ -158,7 +158,7 @@ kore_auth_request(struct http_request *req, struct kore_auth *auth) } struct kore_auth * -kore_auth_lookup(char *name) +kore_auth_lookup(const char *name) { struct kore_auth *auth; diff --git a/src/module.c b/src/module.c @@ -31,7 +31,7 @@ kore_module_init(void) } void -kore_module_load(char *path, char *onload) +kore_module_load(const char *path, const char *onload) { struct stat st; struct kore_module *module; @@ -150,8 +150,8 @@ kore_module_loaded(void) } int -kore_module_handler_new(char *path, char *domain, char *func, - char *auth, int type) +kore_module_handler_new(const char *path, const char *domain, + const char *func, const char *auth, int type) { struct kore_auth *ap; void *addr; @@ -203,7 +203,7 @@ kore_module_handler_new(char *path, char *domain, char *func, } struct kore_module_handle * -kore_module_handler_find(char *domain, char *path) +kore_module_handler_find(const char *domain, const char *path) { struct kore_domain *dom; struct kore_module_handle *hdlr; @@ -225,7 +225,7 @@ kore_module_handler_find(char *domain, char *path) } void * -kore_module_getsym(char *symbol) +kore_module_getsym(const char *symbol) { void *ptr; struct kore_module *module; diff --git a/src/pool.c b/src/pool.c @@ -24,7 +24,8 @@ static void pool_region_create(struct kore_pool *, u_int32_t); void -kore_pool_init(struct kore_pool *pool, char *name, u_int32_t len, u_int32_t elm) +kore_pool_init(struct kore_pool *pool, const char *name, + u_int32_t len, u_int32_t elm) { kore_debug("kore_pool_init(%p, %s, %d, %d)", pool, name, len, elm); diff --git a/src/utils.c b/src/utils.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013 Joris Vink <joris@coders.se> + * Copyright (c) 2013-2014 Joris Vink <joris@coders.se> * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above diff --git a/src/validator.c b/src/validator.c @@ -25,7 +25,7 @@ kore_validator_init(void) } int -kore_validator_add(char *name, u_int8_t type, char *arg) +kore_validator_add(const char *name, u_int8_t type, const char *arg) { struct kore_validator *val; @@ -63,7 +63,7 @@ kore_validator_add(char *name, u_int8_t type, char *arg) } int -kore_validator_run(struct http_request *req, char *name, char *data) +kore_validator_run(struct http_request *req, const char *name, char *data) { struct kore_validator *val; @@ -118,7 +118,7 @@ kore_validator_reload(void) } struct kore_validator * -kore_validator_lookup(char *name) +kore_validator_lookup(const char *name) { struct kore_validator *val;