diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-08-18 11:22:08 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-08-18 11:22:08 +0200 |
commit | dca675afab5776e17f9a37b891a70cd0d97d76f1 (patch) | |
tree | 2274c7e3e7e399ace0858541fd7a16e6e2382689 /src/microhttpd/daemon.c | |
parent | 27a95aa100313190eaca1a5018180e731e17b5c8 (diff) | |
download | libmicrohttpd-dca675afab5776e17f9a37b891a70cd0d97d76f1.tar.gz libmicrohttpd-dca675afab5776e17f9a37b891a70cd0d97d76f1.zip |
polish configure.ac, use AS_IF where appropriate
Diffstat (limited to 'src/microhttpd/daemon.c')
-rw-r--r-- | src/microhttpd/daemon.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c index 721763dd..c70a405a 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c | |||
@@ -3923,6 +3923,8 @@ MHD_poll (struct MHD_Daemon *daemon, | |||
3923 | return MHD_poll_listen_socket (daemon, | 3923 | return MHD_poll_listen_socket (daemon, |
3924 | may_block); | 3924 | may_block); |
3925 | #else | 3925 | #else |
3926 | (void) daemon; | ||
3927 | (void) may_block; | ||
3926 | return MHD_NO; | 3928 | return MHD_NO; |
3927 | #endif | 3929 | #endif |
3928 | } | 3930 | } |
@@ -3960,30 +3962,25 @@ is_urh_ready(struct MHD_UpgradeResponseHandle * const urh) | |||
3960 | (0 == urh->in_buffer_used) && | 3962 | (0 == urh->in_buffer_used) && |
3961 | (0 == urh->out_buffer_used) ) | 3963 | (0 == urh->out_buffer_used) ) |
3962 | return false; | 3964 | return false; |
3963 | |||
3964 | if (connection->daemon->shutdown) | 3965 | if (connection->daemon->shutdown) |
3965 | return true; | 3966 | return true; |
3966 | |||
3967 | if ( ( (0 != (MHD_EPOLL_STATE_READ_READY & urh->app.celi)) || | 3967 | if ( ( (0 != (MHD_EPOLL_STATE_READ_READY & urh->app.celi)) || |
3968 | (connection->tls_read_ready) ) && | 3968 | (connection->tls_read_ready) ) && |
3969 | (urh->in_buffer_used < urh->in_buffer_size) ) | 3969 | (urh->in_buffer_used < urh->in_buffer_size) ) |
3970 | return true; | 3970 | return true; |
3971 | |||
3972 | if ( (0 != (MHD_EPOLL_STATE_READ_READY & urh->mhd.celi)) && | 3971 | if ( (0 != (MHD_EPOLL_STATE_READ_READY & urh->mhd.celi)) && |
3973 | (urh->out_buffer_used < urh->out_buffer_size) ) | 3972 | (urh->out_buffer_used < urh->out_buffer_size) ) |
3974 | return true; | 3973 | return true; |
3975 | |||
3976 | if ( (0 != (MHD_EPOLL_STATE_WRITE_READY & urh->app.celi)) && | 3974 | if ( (0 != (MHD_EPOLL_STATE_WRITE_READY & urh->app.celi)) && |
3977 | (urh->out_buffer_used > 0) ) | 3975 | (urh->out_buffer_used > 0) ) |
3978 | return true; | 3976 | return true; |
3979 | |||
3980 | if ( (0 != (MHD_EPOLL_STATE_WRITE_READY & urh->mhd.celi)) && | 3977 | if ( (0 != (MHD_EPOLL_STATE_WRITE_READY & urh->mhd.celi)) && |
3981 | (urh->in_buffer_used > 0) ) | 3978 | (urh->in_buffer_used > 0) ) |
3982 | return true; | 3979 | return true; |
3983 | |||
3984 | return false; | 3980 | return false; |
3985 | } | 3981 | } |
3986 | 3982 | ||
3983 | |||
3987 | /** | 3984 | /** |
3988 | * Do epoll()-based processing for TLS connections that have been | 3985 | * Do epoll()-based processing for TLS connections that have been |
3989 | * upgraded. This requires a separate epoll() invocation as we | 3986 | * upgraded. This requires a separate epoll() invocation as we |
@@ -4093,11 +4090,13 @@ run_epoll_for_upgrade (struct MHD_Daemon *daemon) | |||
4093 | } | 4090 | } |
4094 | #endif /* HTTPS_SUPPORT && UPGRADE_SUPPORT */ | 4091 | #endif /* HTTPS_SUPPORT && UPGRADE_SUPPORT */ |
4095 | 4092 | ||
4093 | |||
4096 | /** | 4094 | /** |
4097 | * Pointer-marker to distinguish ITC slot in epoll sets. | 4095 | * Pointer-marker to distinguish ITC slot in epoll sets. |
4098 | */ | 4096 | */ |
4099 | static const char * const epoll_itc_marker = "itc_marker"; | 4097 | static const char * const epoll_itc_marker = "itc_marker"; |
4100 | 4098 | ||
4099 | |||
4101 | /** | 4100 | /** |
4102 | * Do epoll()-based processing (this function is allowed to | 4101 | * Do epoll()-based processing (this function is allowed to |
4103 | * block if @a may_block is set to #MHD_YES). | 4102 | * block if @a may_block is set to #MHD_YES). |