summaryrefslogtreecommitdiff
path: root/src/connections-glue.c
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2020-01-10 00:17:12 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2020-07-08 19:54:29 -0400
commitaca9d45adf4fa0f98b98641ef515882580c0f1f9 (patch)
treea550a9c34e85598edaf8a2925e921893194982a3 /src/connections-glue.c
parenta22cdca1cbcfb43edcf5c0b8eaa330b4ec936d52 (diff)
downloadlighttpd-git-aca9d45adf4fa0f98b98641ef515882580c0f1f9.tar.gz
[core] move request state into (request_st *)
NB: in the future, a separate connection state may be needed for connection-level state (different from request state)
Diffstat (limited to 'src/connections-glue.c')
-rw-r--r--src/connections-glue.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/connections-glue.c b/src/connections-glue.c
index d4b9b1e3..c875851e 100644
--- a/src/connections-glue.c
+++ b/src/connections-glue.c
@@ -12,7 +12,7 @@
#include <stdlib.h>
#include <string.h>
-const char *connection_get_state(connection_state_t state) {
+const char *connection_get_state(request_state_t state) {
switch (state) {
case CON_STATE_CONNECT: return "connect";
case CON_STATE_READ: return "read";
@@ -29,7 +29,7 @@ const char *connection_get_state(connection_state_t state) {
}
}
-const char *connection_get_short_state(connection_state_t state) {
+const char *connection_get_short_state(request_state_t state) {
switch (state) {
case CON_STATE_CONNECT: return ".";
case CON_STATE_READ: return "r";
@@ -394,7 +394,7 @@ static int connection_write_100_continue(connection *con) {
*(con->conf.global_bytes_per_second_cnt_ptr) += written;
if (rc < 0) {
- con->state = CON_STATE_ERROR;
+ con->request.state = CON_STATE_ERROR;
return 0; /* error */
}
@@ -423,7 +423,7 @@ handler_t connection_handle_read_post_state(connection *con) {
switch(con->network_read(con, con->read_queue, MAX_READ_LIMIT)) {
case -1:
- con->state = CON_STATE_ERROR;
+ con->request.state = CON_STATE_ERROR;
return HANDLER_ERROR;
case -2:
is_closed = 1;
@@ -470,8 +470,8 @@ handler_t connection_handle_read_post_state(connection *con) {
if (dst_cq->bytes_in == (off_t)con->request.reqbody_length) {
/* Content is ready */
con->conf.stream_request_body &= ~FDEVENT_STREAM_REQUEST_POLLIN;
- if (con->state == CON_STATE_READ_POST) {
- con->state = CON_STATE_HANDLE_REQUEST;
+ if (con->request.state == CON_STATE_READ_POST) {
+ con->request.state = CON_STATE_HANDLE_REQUEST;
}
return HANDLER_GO_ON;
} else if (is_closed) {