commit 571ec180781a55a63007d97bad9755265b282ebf
parent cf6f91bd6ef6d1cd6e430e7ccaa898e67739d20d
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date: Thu, 20 Oct 2022 19:20:01 +0300
New values for MHD_ConnectionEventLoopInfo
Diffstat:
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
@@ -4741,6 +4741,7 @@ connection_reset (struct MHD_Connection *connection,
c->keepalive = MHD_CONN_KEEPALIVE_UNKOWN;
c->state = MHD_CONNECTION_INIT;
+ c->event_loop_info = MHD_EVENT_LOOP_INFO_READ;
memset (&c->rq, 0, sizeof(c->rq));
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
@@ -2530,6 +2530,7 @@ new_connection_prepare_ (struct MHD_Daemon *daemon,
connection->sk_spipe_suppress = sk_spipe_supprs;
connection->daemon = daemon;
connection->connection_timeout_ms = daemon->connection_timeout_ms;
+ connection->event_loop_info = MHD_EVENT_LOOP_INFO_READ;
if (0 != connection->connection_timeout_ms)
connection->last_activity = MHD_monotonic_msec_counter ();
diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h
@@ -214,22 +214,22 @@ enum MHD_ConnectionEventLoopInfo
/**
* We are waiting to be able to read.
*/
- MHD_EVENT_LOOP_INFO_READ = 0,
+ MHD_EVENT_LOOP_INFO_READ = 1 << 0,
/**
* We are waiting to be able to write.
*/
- MHD_EVENT_LOOP_INFO_WRITE = 1,
+ MHD_EVENT_LOOP_INFO_WRITE = 1 << 1,
/**
* We are waiting for the application to provide data.
*/
- MHD_EVENT_LOOP_INFO_BLOCK = 2,
+ MHD_EVENT_LOOP_INFO_BLOCK = 1 << 2,
/**
* We are finished and are awaiting cleanup.
*/
- MHD_EVENT_LOOP_INFO_CLEANUP = 3
+ MHD_EVENT_LOOP_INFO_CLEANUP = 1 << 3
} _MHD_FIXED_ENUM;