aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2022-10-20 19:20:01 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2022-10-22 09:47:59 +0300
commit571ec180781a55a63007d97bad9755265b282ebf (patch)
treea63d2c095139f28c14b3e99f65b31e0485325a11
parentcf6f91bd6ef6d1cd6e430e7ccaa898e67739d20d (diff)
downloadlibmicrohttpd-571ec180781a55a63007d97bad9755265b282ebf.tar.gz
libmicrohttpd-571ec180781a55a63007d97bad9755265b282ebf.zip
New values for MHD_ConnectionEventLoopInfo
-rw-r--r--src/microhttpd/connection.c1
-rw-r--r--src/microhttpd/daemon.c1
-rw-r--r--src/microhttpd/internal.h8
3 files changed, 6 insertions, 4 deletions
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,
4741 4741
4742 c->keepalive = MHD_CONN_KEEPALIVE_UNKOWN; 4742 c->keepalive = MHD_CONN_KEEPALIVE_UNKOWN;
4743 c->state = MHD_CONNECTION_INIT; 4743 c->state = MHD_CONNECTION_INIT;
4744 c->event_loop_info = MHD_EVENT_LOOP_INFO_READ;
4744 4745
4745 memset (&c->rq, 0, sizeof(c->rq)); 4746 memset (&c->rq, 0, sizeof(c->rq));
4746 4747
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,
2530 connection->sk_spipe_suppress = sk_spipe_supprs; 2530 connection->sk_spipe_suppress = sk_spipe_supprs;
2531 connection->daemon = daemon; 2531 connection->daemon = daemon;
2532 connection->connection_timeout_ms = daemon->connection_timeout_ms; 2532 connection->connection_timeout_ms = daemon->connection_timeout_ms;
2533 connection->event_loop_info = MHD_EVENT_LOOP_INFO_READ;
2533 if (0 != connection->connection_timeout_ms) 2534 if (0 != connection->connection_timeout_ms)
2534 connection->last_activity = MHD_monotonic_msec_counter (); 2535 connection->last_activity = MHD_monotonic_msec_counter ();
2535 2536
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
214 /** 214 /**
215 * We are waiting to be able to read. 215 * We are waiting to be able to read.
216 */ 216 */
217 MHD_EVENT_LOOP_INFO_READ = 0, 217 MHD_EVENT_LOOP_INFO_READ = 1 << 0,
218 218
219 /** 219 /**
220 * We are waiting to be able to write. 220 * We are waiting to be able to write.
221 */ 221 */
222 MHD_EVENT_LOOP_INFO_WRITE = 1, 222 MHD_EVENT_LOOP_INFO_WRITE = 1 << 1,
223 223
224 /** 224 /**
225 * We are waiting for the application to provide data. 225 * We are waiting for the application to provide data.
226 */ 226 */
227 MHD_EVENT_LOOP_INFO_BLOCK = 2, 227 MHD_EVENT_LOOP_INFO_BLOCK = 1 << 2,
228 228
229 /** 229 /**
230 * We are finished and are awaiting cleanup. 230 * We are finished and are awaiting cleanup.
231 */ 231 */
232 MHD_EVENT_LOOP_INFO_CLEANUP = 3 232 MHD_EVENT_LOOP_INFO_CLEANUP = 1 << 3
233} _MHD_FIXED_ENUM; 233} _MHD_FIXED_ENUM;
234 234
235 235