summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2019-02-04 19:59:51 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2019-02-04 19:59:51 -0500
commit79aa8613e143e0a40625ad33c42e1bd7cda27304 (patch)
tree672625fc7f6dd91e7f1e61de2a894e0deb80a2d0
parentb8532fe073f06b016bb3bdea535b726ead3db69e (diff)
downloadlighttpd1.4-79aa8613e143e0a40625ad33c42e1bd7cda27304.tar.gz
lighttpd1.4-79aa8613e143e0a40625ad33c42e1bd7cda27304.zip
[core] store joblist pointer on stack
-rw-r--r--src/server.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server.c b/src/server.c
index 708e2b28..ebc2b761 100644
--- a/src/server.c
+++ b/src/server.c
@@ -1952,6 +1952,7 @@ static void server_handle_sigchld (server * const srv) {
__attribute_hot__
__attribute_noinline__
static int server_main_loop (server * const srv) {
+ connections * const joblist = srv->joblist;
time_t last_active_ts = time(NULL);
while (!srv_shutdown) {
@@ -2036,12 +2037,11 @@ static int server_main_loop (server * const srv) {
if (n >= 0) fdevent_sched_run(srv, srv->ev);
- for (size_t ndx = 0; ndx < srv->joblist->used; ++ndx) {
- connection *con = srv->joblist->ptr[ndx];
+ for (size_t ndx = 0; ndx < joblist->used; ++ndx) {
+ connection *con = joblist->ptr[ndx];
connection_state_machine(srv, con);
}
-
- srv->joblist->used = 0;
+ joblist->used = 0;
}
return 0;