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 c494126720cad85e4b40cec6035485f2f04862cd
parent 7b286f2f70fb943b32401bbbc59d208950524dd7
Author: Joris Vink <joris@coders.se>
Date:   Wed,  3 Dec 2014 20:40:44 +0100

Make worker_clients available everywhere.

Diffstat:
includes/kore.h | 3+++
src/worker.c | 4++--
2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/includes/kore.h b/includes/kore.h @@ -207,6 +207,9 @@ struct connection { TAILQ_ENTRY(connection) flush_list; }; +TAILQ_HEAD(connection_list, connection); +extern struct connection_list worker_clients; + struct kore_handler_params { char *name; u_int8_t method; diff --git a/src/worker.c b/src/worker.c @@ -59,14 +59,14 @@ static void worker_unlock(void); static inline int kore_worker_acceptlock_obtain(void); static inline void kore_worker_acceptlock_release(void); -static TAILQ_HEAD(, connection) disconnected; -static TAILQ_HEAD(, connection) worker_clients; +static struct connection_list disconnected; static struct kore_worker *kore_workers; static int shm_accept_key; static struct wlock *accept_lock; extern volatile sig_atomic_t sig_recv; struct kore_worker *worker = NULL; +struct connection_list worker_clients; u_int32_t worker_rlimit_nofiles = 1024; u_int32_t worker_max_connections = 250; u_int32_t worker_active_connections = 0;