all flags start with MHD_USE_, rename MHD_ALLOW_UPGRADE to MHD_USE_UPGRADE for consistency

This commit is contained in:
Christian Grothoff
2016-11-04 17:02:56 +01:00
parent ca582a0633
commit d7392e0882
8 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -591,7 +591,7 @@ Enable TCP_FASTOPEN on the listen socket. TCP_FASTOPEN is currently
supported on Linux >= 3.6. On other systems using this option with
cause @code{MHD_start_daemon} to fail.
@item MHD_ALLOW_UPGRADE
@item MHD_USE_UPGRADE
@cindex upgrade
This option must be set if you want to upgrade connections
(via ``101 Switching Protocols'' responses). This requires MHD to
+1 -1
View File
@@ -275,7 +275,7 @@ main (int argc,
printf ("%s PORT\n", argv[0]);
return 1;
}
d = MHD_start_daemon (MHD_ALLOW_UPGRADE | MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG,
d = MHD_start_daemon (MHD_USE_UPGRADE | MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG,
atoi (argv[1]),
NULL, NULL,
&ahc_echo, NULL,
+2 -2
View File
@@ -690,7 +690,7 @@ enum MHD_FLAG
* "Upgrade" may require usage of additional internal resources,
* which we do not want to use unless necessary.
*/
MHD_ALLOW_UPGRADE = 32768
MHD_USE_UPGRADE = 32768
};
@@ -2859,7 +2859,7 @@ enum MHD_FEATURE
/**
* Get whether HTTP "Upgrade" is supported.
* If supported then #MHD_ALLOW_UPGRADE, #MHD_upgrade_action() and
* If supported then #MHD_USE_UPGRADE, #MHD_upgrade_action() and
* #MHD_create_response_for_upgrade() can be used.
*/
MHD_FEATURE_UPGRADE = 17
+2 -2
View File
@@ -3455,11 +3455,11 @@ MHD_queue_response (struct MHD_Connection *connection,
#ifdef UPGRADE_SUPPORT
daemon = connection->daemon;
if ( (NULL != response->upgrade_handler) &&
(0 == (daemon->options & MHD_ALLOW_UPGRADE)) )
(0 == (daemon->options & MHD_USE_UPGRADE)) )
{
#ifdef HAVE_MESSAGES
MHD_DLOG (daemon,
_("Attempted 'upgrade' connection on daemon without MHD_ALLOW_UPGRADE option!\n"));
_("Attempted 'upgrade' connection on daemon without MHD_USE_UPGRADE option!\n"));
#endif
return MHD_NO;
}
+3 -3
View File
@@ -4639,7 +4639,7 @@ setup_epoll_to_listen (struct MHD_Daemon *daemon)
if (-1 == daemon->epoll_fd)
return MHD_NO;
#if defined(HTTPS_SUPPORT) && defined(UPGRADE_SUPPORT)
if (0 != (MHD_ALLOW_UPGRADE & daemon->options))
if (0 != (MHD_USE_UPGRADE & daemon->options))
{
daemon->epoll_upgrade_fd = setup_epoll_fd (daemon);
if (MHD_INVALID_SOCKET == daemon->epoll_upgrade_fd)
@@ -4740,7 +4740,7 @@ MHD_start_daemon_va (unsigned int flags,
if (0 != (flags & MHD_USE_TCP_FASTOPEN))
return NULL;
#endif
if (0 != (flags & MHD_ALLOW_UPGRADE))
if (0 != (flags & MHD_USE_UPGRADE))
{
#ifdef UPGRADE_SUPPORT
flags |= MHD_USE_SUSPEND_RESUME;
@@ -5449,7 +5449,7 @@ close_all_connections (struct MHD_Daemon *daemon)
struct MHD_Connection *pos;
const _MHD_bool used_thr_p_c = (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION));
#ifdef UPGRADE_SUPPORT
const _MHD_bool upg_allowed = (0 != (daemon->options & MHD_ALLOW_UPGRADE));
const _MHD_bool upg_allowed = (0 != (daemon->options & MHD_USE_UPGRADE));
#endif /* UPGRADE_SUPPORT */
#if defined(HTTPS_SUPPORT) && defined(UPGRADE_SUPPORT)
struct MHD_UpgradeResponseHandle *urh;
+1 -1
View File
@@ -692,7 +692,7 @@ MHD_response_execute_upgrade_ (struct MHD_Response *response,
struct MHD_UpgradeResponseHandle *urh;
size_t rbo;
if (0 == (daemon->options & MHD_ALLOW_UPGRADE))
if (0 == (daemon->options & MHD_USE_UPGRADE))
return MHD_NO;
if (NULL ==
+1 -1
View File
@@ -61,7 +61,7 @@ test_upgrade (int flags,
done = 0;
d = MHD_start_daemon (flags | MHD_USE_DEBUG | MHD_ALLOW_UPGRADE,
d = MHD_start_daemon (flags | MHD_USE_DEBUG | MHD_USE_UPGRADE,
1080,
NULL, NULL,
&ahc_upgrade, NULL,
+1 -1
View File
@@ -139,7 +139,7 @@ test_upgrade (int flags,
done = 0;
d = MHD_start_daemon (flags | MHD_USE_DEBUG | MHD_ALLOW_UPGRADE | MHD_USE_TLS,
d = MHD_start_daemon (flags | MHD_USE_DEBUG | MHD_USE_UPGRADE | MHD_USE_TLS,
1080,
NULL, NULL,
&ahc_upgrade, NULL,