summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2021-08-10 22:59:51 +0200
committerLeah Neukirchen <leah@vuxu.org>2021-08-10 22:59:51 +0200
commitd5bb43b55dbf2b195923baf1db32ce5cad6e1a64 (patch)
tree452d28ea2a605b752613a265104ef66acce9ce40
parente19bb2ea3ece45dc6c9a6d8d71f4083e9063b5fc (diff)
downloadhittpd-d5bb43b55dbf2b195923baf1db32ce5cad6e1a64.tar.gz
hittpd-d5bb43b55dbf2b195923baf1db32ce5cad6e1a64.tar.xz
hittpd-d5bb43b55dbf2b195923baf1db32ce5cad6e1a64.zip
gather globals
-rw-r--r--hittpd.c18
1 files 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)
 {