diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-11-04 14:40:15 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-11-04 14:40:15 +0100 |
commit | 892de4180293ba68b74858580af6790fd4635ddc (patch) | |
tree | c8b96b69d1c20b3d2d50b3f1d976d6f20d0f34ca | |
parent | a0118ad4e17359e8b1d836aec2d40b43d414c1d3 (diff) | |
download | libmicrohttpd-892de4180293ba68b74858580af6790fd4635ddc.tar.gz libmicrohttpd-892de4180293ba68b74858580af6790fd4635ddc.zip |
change order to reduce #ifdef'ing
-rw-r--r-- | src/microhttpd/daemon.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c index c1e5cffe..8405aa56 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c | |||
@@ -5448,16 +5448,14 @@ close_all_connections (struct MHD_Daemon *daemon) | |||
5448 | { | 5448 | { |
5449 | struct MHD_Connection *pos; | 5449 | struct MHD_Connection *pos; |
5450 | const _MHD_bool used_thr_p_c = (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)); | 5450 | const _MHD_bool used_thr_p_c = (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)); |
5451 | #ifdef UPGRADE_SUPPORT | ||
5452 | const _MHD_bool upg_allowed = (0 != (daemon->options & MHD_ALLOW_UPGRADE)); | ||
5453 | #endif /* UPGRADE_SUPPORT */ | ||
5451 | #if defined(HTTPS_SUPPORT) && defined(UPGRADE_SUPPORT) | 5454 | #if defined(HTTPS_SUPPORT) && defined(UPGRADE_SUPPORT) |
5452 | struct MHD_UpgradeResponseHandle *urh; | 5455 | struct MHD_UpgradeResponseHandle *urh; |
5453 | struct MHD_UpgradeResponseHandle *urhn; | 5456 | struct MHD_UpgradeResponseHandle *urhn; |
5454 | const _MHD_bool used_tls = (0 != (daemon->options & MHD_USE_TLS)); | 5457 | const _MHD_bool used_tls = (0 != (daemon->options & MHD_USE_TLS)); |
5455 | #endif /* HTTPS_SUPPORT && UPGRADE_SUPPORT */ | ||
5456 | #ifdef UPGRADE_SUPPORT | ||
5457 | const _MHD_bool upg_allowed = (0 != (daemon->options & MHD_ALLOW_UPGRADE)); | ||
5458 | #endif /* UPGRADE_SUPPORT */ | ||
5459 | 5458 | ||
5460 | #if defined(HTTPS_SUPPORT) && defined(UPGRADE_SUPPORT) | ||
5461 | /* give upgraded HTTPS connections a chance to finish */ | 5459 | /* give upgraded HTTPS connections a chance to finish */ |
5462 | /* 'daemon->urh_head' is not used in thread-per-connection mode. */ | 5460 | /* 'daemon->urh_head' is not used in thread-per-connection mode. */ |
5463 | for (urh = daemon->urh_head; NULL != urh; urh = urhn) | 5461 | for (urh = daemon->urh_head; NULL != urh; urh = urhn) |