From 571ec180781a55a63007d97bad9755265b282ebf Mon Sep 17 00:00:00 2001 From: "Evgeny Grin (Karlson2k)" Date: Thu, 20 Oct 2022 19:20:01 +0300 Subject: New values for MHD_ConnectionEventLoopInfo --- src/microhttpd/connection.c | 1 + src/microhttpd/daemon.c | 1 + src/microhttpd/internal.h | 8 ++++---- 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src/microhttpd') diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c index 30260402..2056fe3d 100644 --- 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 index 60aa2471..59a7d7e1 100644 --- 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 index 6a88177e..6a94faea 100644 --- 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; -- cgit v1.2.3