From d5bb43b55dbf2b195923baf1db32ce5cad6e1a64 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Tue, 10 Aug 2021 22:59:51 +0200 Subject: gather globals --- hittpd.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/hittpd.c b/hittpd.c index fef83d8..d38f9a9 100644 --- a/hittpd.c +++ b/hittpd.c @@ -106,6 +106,15 @@ int only_public = 0; int reuse_port = 0; const char *custom_mimetypes = ""; +time_t now; +char timestamp[64]; + +struct pollfd client[MAX_CLIENTS]; +struct http_parser parsers[MAX_CLIENTS]; +struct conn_data datas[MAX_CLIENTS]; + +sig_atomic_t stop; + static int on_url(http_parser *p, const char *s, size_t l) { @@ -246,9 +255,6 @@ content_length(struct conn_data *data) return data->last - data->first; } -time_t now; -char timestamp[64]; - void accesslog(http_parser *p, int status) { @@ -770,10 +776,6 @@ static http_parser_settings settings = { .on_url = on_url, }; -struct pollfd client[MAX_CLIENTS]; -struct http_parser parsers[MAX_CLIENTS]; -struct conn_data datas[MAX_CLIENTS]; - void close_connection(int i) { @@ -936,8 +938,6 @@ read_client(int i) } } -sig_atomic_t stop; - void do_stop(int sig) { -- cgit 1.4.1