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 5228fe1cbc695e98e957c72f93f5b966cfb2417a
parent 5f48a0370342947862e7966f0e816a1bbea4029a
Author: Joris Vink <joris@coders.se>
Date:   Mon, 18 May 2015 12:20:28 +0200

Fix typo in configuration option worker_accept_treshold.

There is no backwards comptabile option available.

Fixes #53

Diffstat:
conf/kore.conf.example | 2+-
includes/kore.h | 2+-
src/bsd.c | 4++--
src/config.c | 10+++++-----
src/linux.c | 4++--
src/worker.c | 2+-
6 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/conf/kore.conf.example b/conf/kore.conf.example @@ -30,7 +30,7 @@ workers 4 # how new connections are spread across worker processes. # # This is disabled by default. -#worker_accept_treshold 0 +#worker_accept_threshold 0 # Workers bind themselves to a single CPU by default. # Turn this off by setting this option to 0 diff --git a/includes/kore.h b/includes/kore.h @@ -377,7 +377,7 @@ extern u_int8_t worker_set_affinity; extern u_int32_t worker_rlimit_nofiles; extern u_int32_t worker_max_connections; extern u_int32_t worker_active_connections; -extern u_int32_t worker_accept_treshold; +extern u_int32_t worker_accept_threshold; extern u_int64_t kore_websocket_maxframe; extern u_int64_t kore_websocket_timeout; extern u_int32_t kore_socket_backlog; diff --git a/src/bsd.c b/src/bsd.c @@ -148,8 +148,8 @@ kore_platform_event_wait(u_int64_t timer) while (worker_active_connections < worker_max_connections) { - if (worker_accept_treshold != 0 && - r >= worker_accept_treshold) + if (worker_accept_threshold != 0 && + r >= worker_accept_threshold) break; if (!kore_connection_accept(l, &c)) { diff --git a/src/config.c b/src/config.c @@ -44,7 +44,7 @@ static int configure_certfile(char **); static int configure_certkey(char **); static int configure_rlimit_nofiles(char **); static int configure_max_connections(char **); -static int configure_accept_treshold(char **); +static int configure_accept_threshold(char **); static int configure_set_affinity(char **); static int configure_tls_version(char **); static int configure_tls_cipher(char **); @@ -94,7 +94,7 @@ static struct { { "workers", configure_workers }, { "worker_max_connections", configure_max_connections }, { "worker_rlimit_nofiles", configure_rlimit_nofiles }, - { "worker_accept_treshold", configure_accept_treshold }, + { "worker_accept_threshold", configure_accept_threshold }, { "worker_set_affinity", configure_set_affinity }, { "pidfile", configure_pidfile }, { "accesslog", configure_accesslog }, @@ -600,16 +600,16 @@ configure_rlimit_nofiles(char **argv) } static int -configure_accept_treshold(char **argv) +configure_accept_threshold(char **argv) { int err; if (argv[1] == NULL) return (KORE_RESULT_ERROR); - worker_accept_treshold = kore_strtonum(argv[1], 0, 1, UINT_MAX, &err); + worker_accept_threshold = kore_strtonum(argv[1], 0, 1, UINT_MAX, &err); if (err != KORE_RESULT_OK) { - printf("bad value for worker_accept_treshold: %s\n", argv[1]); + printf("bad value for worker_accept_threshold: %s\n", argv[1]); return (KORE_RESULT_ERROR); } diff --git a/src/linux.c b/src/linux.c @@ -129,8 +129,8 @@ kore_platform_event_wait(u_int64_t timer) while (worker_active_connections < worker_max_connections) { - if (worker_accept_treshold != 0 && - r >= worker_accept_treshold) + if (worker_accept_threshold != 0 && + r >= worker_accept_threshold) break; if (!kore_connection_accept(l, &c)) { diff --git a/src/worker.c b/src/worker.c @@ -69,7 +69,7 @@ extern volatile sig_atomic_t sig_recv; struct kore_worker *worker = NULL; struct connection_list worker_clients; u_int8_t worker_set_affinity = 1; -u_int32_t worker_accept_treshold = 0; +u_int32_t worker_accept_threshold = 0; u_int32_t worker_rlimit_nofiles = 1024; u_int32_t worker_max_connections = 250; u_int32_t worker_active_connections = 0;