aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/daemon.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-02-15 13:31:36 +0100
committerChristian Grothoff <christian@grothoff.org>2017-02-15 13:31:36 +0100
commit925adb38895740003e6309d8170202fde1c337d1 (patch)
tree009c481a844163a357125fb6b3cb239e363c92b9 /src/microhttpd/daemon.c
parente5fd7e14da95d93568cba31aa5a756cf63505d3f (diff)
downloadlibmicrohttpd-925adb38895740003e6309d8170202fde1c337d1.tar.gz
libmicrohttpd-925adb38895740003e6309d8170202fde1c337d1.zip
convert clean_ready to 'bool'
Diffstat (limited to 'src/microhttpd/daemon.c')
-rw-r--r--src/microhttpd/daemon.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 2c976a8d..d7692394 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -1753,7 +1753,7 @@ thread_main_handle_connection (void *data)
1753 /* MHD_connection_finish_forward_() was called by thread_main_connection_upgrade(). */ 1753 /* MHD_connection_finish_forward_() was called by thread_main_connection_upgrade(). */
1754 1754
1755 /* "Upgraded" data will not be used in this thread from this point. */ 1755 /* "Upgraded" data will not be used in this thread from this point. */
1756 con->urh->clean_ready = MHD_YES; 1756 con->urh->clean_ready = true;
1757 /* If 'urh->was_closed' set to true, connection will be 1757 /* If 'urh->was_closed' set to true, connection will be
1758 * moved immediately to cleanup list. Otherwise connection 1758 * moved immediately to cleanup list. Otherwise connection
1759 * will stay in suspended list until 'urh' will be marked 1759 * will stay in suspended list until 'urh' will be marked
@@ -2501,7 +2501,7 @@ resume_suspended_connections (struct MHD_Daemon *daemon)
2501#ifdef UPGRADE_SUPPORT 2501#ifdef UPGRADE_SUPPORT
2502 || ( (NULL != urh) && 2502 || ( (NULL != urh) &&
2503 ( (! urh->was_closed) || 2503 ( (! urh->was_closed) ||
2504 (MHD_NO == urh->clean_ready) ) ) 2504 (! urh->clean_ready) ) )
2505#endif /* UPGRADE_SUPPORT */ 2505#endif /* UPGRADE_SUPPORT */
2506 ) 2506 )
2507 continue; 2507 continue;
@@ -3079,7 +3079,7 @@ MHD_run_from_select (struct MHD_Daemon *daemon,
3079 (0 == urh->out_buffer_used) ) 3079 (0 == urh->out_buffer_used) )
3080 { 3080 {
3081 MHD_connection_finish_forward_ (urh->connection); 3081 MHD_connection_finish_forward_ (urh->connection);
3082 urh->clean_ready = MHD_YES; 3082 urh->clean_ready = true;
3083 /* Resuming will move connection to cleanup list. */ 3083 /* Resuming will move connection to cleanup list. */
3084 MHD_resume_connection(urh->connection); 3084 MHD_resume_connection(urh->connection);
3085 } 3085 }
@@ -3478,7 +3478,7 @@ MHD_poll_all (struct MHD_Daemon *daemon,
3478 /* MHD_connection_finish_forward_() will remove connection from 3478 /* MHD_connection_finish_forward_() will remove connection from
3479 * 'daemon->urh_head' list. */ 3479 * 'daemon->urh_head' list. */
3480 MHD_connection_finish_forward_ (urh->connection); 3480 MHD_connection_finish_forward_ (urh->connection);
3481 urh->clean_ready = MHD_YES; 3481 urh->clean_ready = true;
3482 /* If 'urh->was_closed' set to true, connection will be 3482 /* If 'urh->was_closed' set to true, connection will be
3483 * moved immediately to cleanup list. Otherwise connection 3483 * moved immediately to cleanup list. Otherwise connection
3484 * will stay in suspended list until 'urh' will be marked 3484 * will stay in suspended list until 'urh' will be marked
@@ -3660,7 +3660,7 @@ run_epoll_for_upgrade (struct MHD_Daemon *daemon)
3660 * one time for TLS data and one time for socketpair data. 3660 * one time for TLS data and one time for socketpair data.
3661 * If forwarding was finished on first time, second time must 3661 * If forwarding was finished on first time, second time must
3662 * be skipped as urh must not be used anymore. */ 3662 * be skipped as urh must not be used anymore. */
3663 if (MHD_NO != urh->clean_ready) 3663 if (urh->clean_ready)
3664 continue; 3664 continue;
3665 3665
3666 /* Update our state based on what is ready according to epoll() */ 3666 /* Update our state based on what is ready according to epoll() */
@@ -3677,7 +3677,7 @@ run_epoll_for_upgrade (struct MHD_Daemon *daemon)
3677 (0 == urh->out_buffer_used) ) 3677 (0 == urh->out_buffer_used) )
3678 { 3678 {
3679 MHD_connection_finish_forward_ (urh->connection); 3679 MHD_connection_finish_forward_ (urh->connection);
3680 urh->clean_ready = MHD_YES; 3680 urh->clean_ready = true;
3681 /* If 'urh->was_closed' set to true, connection will be 3681 /* If 'urh->was_closed' set to true, connection will be
3682 * moved immediately to cleanup list. Otherwise connection 3682 * moved immediately to cleanup list. Otherwise connection
3683 * will stay in suspended list until 'urh' will be marked 3683 * will stay in suspended list until 'urh' will be marked
@@ -5606,7 +5606,7 @@ close_all_connections (struct MHD_Daemon *daemon)
5606 with chance to detect that application is done. */ 5606 with chance to detect that application is done. */
5607 process_urh (urh); 5607 process_urh (urh);
5608 MHD_connection_finish_forward_ (urh->connection); 5608 MHD_connection_finish_forward_ (urh->connection);
5609 urh->clean_ready = MHD_YES; 5609 urh->clean_ready = true;
5610 /* Resuming will move connection to cleanup list. */ 5610 /* Resuming will move connection to cleanup list. */
5611 MHD_resume_connection(urh->connection); 5611 MHD_resume_connection(urh->connection);
5612 } 5612 }
@@ -5637,7 +5637,7 @@ close_all_connections (struct MHD_Daemon *daemon)
5637#ifdef HTTPS_SUPPORT 5637#ifdef HTTPS_SUPPORT
5638 else if (used_tls && 5638 else if (used_tls &&
5639 used_thr_p_c && 5639 used_thr_p_c &&
5640 (MHD_NO == susp->urh->clean_ready) ) 5640 (! susp->urh->clean_ready) )
5641 shutdown (urh->app.socket, 5641 shutdown (urh->app.socket,
5642 SHUT_RDWR); /* Wake thread by shutdown of app socket. */ 5642 SHUT_RDWR); /* Wake thread by shutdown of app socket. */
5643#endif /* HTTPS_SUPPORT */ 5643#endif /* HTTPS_SUPPORT */