aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-11-04 17:02:56 +0100
committerChristian Grothoff <christian@grothoff.org>2016-11-04 17:02:56 +0100
commitd7392e0882eb7b1cc559d25849204c966a5091ef (patch)
tree5dd02bc50e3f95ea1b7b385ced64f207869be87a
parentca582a0633be1d06210ad5eefca753f8e87d6211 (diff)
downloadlibmicrohttpd-d7392e0882eb7b1cc559d25849204c966a5091ef.tar.gz
libmicrohttpd-d7392e0882eb7b1cc559d25849204c966a5091ef.zip
all flags start with MHD_USE_, rename MHD_ALLOW_UPGRADE to MHD_USE_UPGRADE for consistency
-rw-r--r--doc/libmicrohttpd.texi2
-rw-r--r--src/examples/upgrade_example.c2
-rw-r--r--src/include/microhttpd.h4
-rw-r--r--src/microhttpd/connection.c4
-rw-r--r--src/microhttpd/daemon.c6
-rw-r--r--src/microhttpd/response.c2
-rw-r--r--src/microhttpd/test_upgrade.c2
-rw-r--r--src/microhttpd/test_upgrade_ssl.c2
8 files changed, 12 insertions, 12 deletions
diff --git a/doc/libmicrohttpd.texi b/doc/libmicrohttpd.texi
index 730c41f9..fac6e634 100644
--- a/doc/libmicrohttpd.texi
+++ b/doc/libmicrohttpd.texi
@@ -591,7 +591,7 @@ Enable TCP_FASTOPEN on the listen socket. TCP_FASTOPEN is currently
591supported on Linux >= 3.6. On other systems using this option with 591supported on Linux >= 3.6. On other systems using this option with
592cause @code{MHD_start_daemon} to fail. 592cause @code{MHD_start_daemon} to fail.
593 593
594@item MHD_ALLOW_UPGRADE 594@item MHD_USE_UPGRADE
595@cindex upgrade 595@cindex upgrade
596This option must be set if you want to upgrade connections 596This option must be set if you want to upgrade connections
597(via ``101 Switching Protocols'' responses). This requires MHD to 597(via ``101 Switching Protocols'' responses). This requires MHD to
diff --git a/src/examples/upgrade_example.c b/src/examples/upgrade_example.c
index a917b723..bce6b277 100644
--- a/src/examples/upgrade_example.c
+++ b/src/examples/upgrade_example.c
@@ -275,7 +275,7 @@ main (int argc,
275 printf ("%s PORT\n", argv[0]); 275 printf ("%s PORT\n", argv[0]);
276 return 1; 276 return 1;
277 } 277 }
278 d = MHD_start_daemon (MHD_ALLOW_UPGRADE | MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, 278 d = MHD_start_daemon (MHD_USE_UPGRADE | MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG,
279 atoi (argv[1]), 279 atoi (argv[1]),
280 NULL, NULL, 280 NULL, NULL,
281 &ahc_echo, NULL, 281 &ahc_echo, NULL,
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
index 76348978..21d90fa2 100644
--- a/src/include/microhttpd.h
+++ b/src/include/microhttpd.h
@@ -690,7 +690,7 @@ enum MHD_FLAG
690 * "Upgrade" may require usage of additional internal resources, 690 * "Upgrade" may require usage of additional internal resources,
691 * which we do not want to use unless necessary. 691 * which we do not want to use unless necessary.
692 */ 692 */
693 MHD_ALLOW_UPGRADE = 32768 693 MHD_USE_UPGRADE = 32768
694 694
695}; 695};
696 696
@@ -2859,7 +2859,7 @@ enum MHD_FEATURE
2859 2859
2860 /** 2860 /**
2861 * Get whether HTTP "Upgrade" is supported. 2861 * Get whether HTTP "Upgrade" is supported.
2862 * If supported then #MHD_ALLOW_UPGRADE, #MHD_upgrade_action() and 2862 * If supported then #MHD_USE_UPGRADE, #MHD_upgrade_action() and
2863 * #MHD_create_response_for_upgrade() can be used. 2863 * #MHD_create_response_for_upgrade() can be used.
2864 */ 2864 */
2865 MHD_FEATURE_UPGRADE = 17 2865 MHD_FEATURE_UPGRADE = 17
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 60bf9f65..0c9d1f9b 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -3455,11 +3455,11 @@ MHD_queue_response (struct MHD_Connection *connection,
3455#ifdef UPGRADE_SUPPORT 3455#ifdef UPGRADE_SUPPORT
3456 daemon = connection->daemon; 3456 daemon = connection->daemon;
3457 if ( (NULL != response->upgrade_handler) && 3457 if ( (NULL != response->upgrade_handler) &&
3458 (0 == (daemon->options & MHD_ALLOW_UPGRADE)) ) 3458 (0 == (daemon->options & MHD_USE_UPGRADE)) )
3459 { 3459 {
3460#ifdef HAVE_MESSAGES 3460#ifdef HAVE_MESSAGES
3461 MHD_DLOG (daemon, 3461 MHD_DLOG (daemon,
3462 _("Attempted 'upgrade' connection on daemon without MHD_ALLOW_UPGRADE option!\n")); 3462 _("Attempted 'upgrade' connection on daemon without MHD_USE_UPGRADE option!\n"));
3463#endif 3463#endif
3464 return MHD_NO; 3464 return MHD_NO;
3465 } 3465 }
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 014e35e1..b469c70b 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -4639,7 +4639,7 @@ setup_epoll_to_listen (struct MHD_Daemon *daemon)
4639 if (-1 == daemon->epoll_fd) 4639 if (-1 == daemon->epoll_fd)
4640 return MHD_NO; 4640 return MHD_NO;
4641#if defined(HTTPS_SUPPORT) && defined(UPGRADE_SUPPORT) 4641#if defined(HTTPS_SUPPORT) && defined(UPGRADE_SUPPORT)
4642 if (0 != (MHD_ALLOW_UPGRADE & daemon->options)) 4642 if (0 != (MHD_USE_UPGRADE & daemon->options))
4643 { 4643 {
4644 daemon->epoll_upgrade_fd = setup_epoll_fd (daemon); 4644 daemon->epoll_upgrade_fd = setup_epoll_fd (daemon);
4645 if (MHD_INVALID_SOCKET == daemon->epoll_upgrade_fd) 4645 if (MHD_INVALID_SOCKET == daemon->epoll_upgrade_fd)
@@ -4740,7 +4740,7 @@ MHD_start_daemon_va (unsigned int flags,
4740 if (0 != (flags & MHD_USE_TCP_FASTOPEN)) 4740 if (0 != (flags & MHD_USE_TCP_FASTOPEN))
4741 return NULL; 4741 return NULL;
4742#endif 4742#endif
4743 if (0 != (flags & MHD_ALLOW_UPGRADE)) 4743 if (0 != (flags & MHD_USE_UPGRADE))
4744 { 4744 {
4745#ifdef UPGRADE_SUPPORT 4745#ifdef UPGRADE_SUPPORT
4746 flags |= MHD_USE_SUSPEND_RESUME; 4746 flags |= MHD_USE_SUSPEND_RESUME;
@@ -5449,7 +5449,7 @@ close_all_connections (struct MHD_Daemon *daemon)
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 5451#ifdef UPGRADE_SUPPORT
5452 const _MHD_bool upg_allowed = (0 != (daemon->options & MHD_ALLOW_UPGRADE)); 5452 const _MHD_bool upg_allowed = (0 != (daemon->options & MHD_USE_UPGRADE));
5453#endif /* UPGRADE_SUPPORT */ 5453#endif /* UPGRADE_SUPPORT */
5454#if defined(HTTPS_SUPPORT) && defined(UPGRADE_SUPPORT) 5454#if defined(HTTPS_SUPPORT) && defined(UPGRADE_SUPPORT)
5455 struct MHD_UpgradeResponseHandle *urh; 5455 struct MHD_UpgradeResponseHandle *urh;
diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c
index 17fe8122..26cae65e 100644
--- a/src/microhttpd/response.c
+++ b/src/microhttpd/response.c
@@ -692,7 +692,7 @@ MHD_response_execute_upgrade_ (struct MHD_Response *response,
692 struct MHD_UpgradeResponseHandle *urh; 692 struct MHD_UpgradeResponseHandle *urh;
693 size_t rbo; 693 size_t rbo;
694 694
695 if (0 == (daemon->options & MHD_ALLOW_UPGRADE)) 695 if (0 == (daemon->options & MHD_USE_UPGRADE))
696 return MHD_NO; 696 return MHD_NO;
697 697
698 if (NULL == 698 if (NULL ==
diff --git a/src/microhttpd/test_upgrade.c b/src/microhttpd/test_upgrade.c
index fff2d985..72583451 100644
--- a/src/microhttpd/test_upgrade.c
+++ b/src/microhttpd/test_upgrade.c
@@ -61,7 +61,7 @@ test_upgrade (int flags,
61 61
62 done = 0; 62 done = 0;
63 63
64 d = MHD_start_daemon (flags | MHD_USE_DEBUG | MHD_ALLOW_UPGRADE, 64 d = MHD_start_daemon (flags | MHD_USE_DEBUG | MHD_USE_UPGRADE,
65 1080, 65 1080,
66 NULL, NULL, 66 NULL, NULL,
67 &ahc_upgrade, NULL, 67 &ahc_upgrade, NULL,
diff --git a/src/microhttpd/test_upgrade_ssl.c b/src/microhttpd/test_upgrade_ssl.c
index bc4c4249..bb3d2c3b 100644
--- a/src/microhttpd/test_upgrade_ssl.c
+++ b/src/microhttpd/test_upgrade_ssl.c
@@ -139,7 +139,7 @@ test_upgrade (int flags,
139 139
140 done = 0; 140 done = 0;
141 141
142 d = MHD_start_daemon (flags | MHD_USE_DEBUG | MHD_ALLOW_UPGRADE | MHD_USE_TLS, 142 d = MHD_start_daemon (flags | MHD_USE_DEBUG | MHD_USE_UPGRADE | MHD_USE_TLS,
143 1080, 143 1080,
144 NULL, NULL, 144 NULL, NULL,
145 &ahc_upgrade, NULL, 145 &ahc_upgrade, NULL,