diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-02-15 13:28:32 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-02-15 13:28:32 +0100 |
commit | 3b2c0e14365870933c6090d3c2537995e48b36e5 (patch) | |
tree | adff89dd93902d51b18f722d3065656668619ed6 | |
parent | f9c239ec2a5d21a5ea4855fb002b65aeb10eb012 (diff) | |
download | libmicrohttpd-3b2c0e14365870933c6090d3c2537995e48b36e5.tar.gz libmicrohttpd-3b2c0e14365870933c6090d3c2537995e48b36e5.zip |
convert upgrade_fd_in_epoll to 'bool'
-rw-r--r-- | src/microhttpd/daemon.c | 8 | ||||
-rw-r--r-- | src/microhttpd/internal.h | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c index 11df3a38..993ad27c 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c | |||
@@ -3758,7 +3758,7 @@ MHD_epoll (struct MHD_Daemon *daemon, | |||
3758 | } | 3758 | } |
3759 | 3759 | ||
3760 | #if defined(HTTPS_SUPPORT) && defined(UPGRADE_SUPPORT) | 3760 | #if defined(HTTPS_SUPPORT) && defined(UPGRADE_SUPPORT) |
3761 | if ( (MHD_NO == daemon->upgrade_fd_in_epoll) && | 3761 | if ( (! daemon->upgrade_fd_in_epoll) && |
3762 | (-1 != daemon->epoll_upgrade_fd) ) | 3762 | (-1 != daemon->epoll_upgrade_fd) ) |
3763 | { | 3763 | { |
3764 | event.events = EPOLLIN | EPOLLOUT; | 3764 | event.events = EPOLLIN | EPOLLOUT; |
@@ -3775,7 +3775,7 @@ MHD_epoll (struct MHD_Daemon *daemon, | |||
3775 | #endif | 3775 | #endif |
3776 | return MHD_NO; | 3776 | return MHD_NO; |
3777 | } | 3777 | } |
3778 | daemon->upgrade_fd_in_epoll = MHD_YES; | 3778 | daemon->upgrade_fd_in_epoll = true; |
3779 | } | 3779 | } |
3780 | #endif /* HTTPS_SUPPORT && UPGRADE_SUPPORT */ | 3780 | #endif /* HTTPS_SUPPORT && UPGRADE_SUPPORT */ |
3781 | if ( (daemon->listen_socket_in_epoll) && | 3781 | if ( (daemon->listen_socket_in_epoll) && |
@@ -5544,14 +5544,14 @@ thread_failed: | |||
5544 | indicate failure */ | 5544 | indicate failure */ |
5545 | #ifdef EPOLL_SUPPORT | 5545 | #ifdef EPOLL_SUPPORT |
5546 | #if defined(HTTPS_SUPPORT) && defined(UPGRADE_SUPPORT) | 5546 | #if defined(HTTPS_SUPPORT) && defined(UPGRADE_SUPPORT) |
5547 | if (MHD_YES == daemon->upgrade_fd_in_epoll) | 5547 | if (daemon->upgrade_fd_in_epoll) |
5548 | { | 5548 | { |
5549 | if (0 != epoll_ctl (daemon->epoll_fd, | 5549 | if (0 != epoll_ctl (daemon->epoll_fd, |
5550 | EPOLL_CTL_DEL, | 5550 | EPOLL_CTL_DEL, |
5551 | daemon->epoll_upgrade_fd, | 5551 | daemon->epoll_upgrade_fd, |
5552 | NULL)) | 5552 | NULL)) |
5553 | MHD_PANIC (_("Failed to remove FD from epoll set\n")); | 5553 | MHD_PANIC (_("Failed to remove FD from epoll set\n")); |
5554 | daemon->upgrade_fd_in_epoll = MHD_NO; | 5554 | daemon->upgrade_fd_in_epoll = false; |
5555 | } | 5555 | } |
5556 | #endif /* HTTPS_SUPPORT && UPGRADE_SUPPORT */ | 5556 | #endif /* HTTPS_SUPPORT && UPGRADE_SUPPORT */ |
5557 | if (-1 != daemon->epoll_fd) | 5557 | if (-1 != daemon->epoll_fd) |
diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h index b9c30b5d..707bfe82 100644 --- a/src/microhttpd/internal.h +++ b/src/microhttpd/internal.h | |||
@@ -1407,10 +1407,10 @@ struct MHD_Daemon | |||
1407 | int epoll_upgrade_fd; | 1407 | int epoll_upgrade_fd; |
1408 | 1408 | ||
1409 | /** | 1409 | /** |
1410 | * #MHD_YES if @e epoll_upgrade_fd is in the 'epoll' set, | 1410 | * true if @e epoll_upgrade_fd is in the 'epoll' set, |
1411 | * #MHD_NO if not. | 1411 | * false if not. |
1412 | */ | 1412 | */ |
1413 | int upgrade_fd_in_epoll; | 1413 | bool upgrade_fd_in_epoll; |
1414 | #endif /* HTTPS_SUPPORT && UPGRADE_SUPPORT */ | 1414 | #endif /* HTTPS_SUPPORT && UPGRADE_SUPPORT */ |
1415 | 1415 | ||
1416 | #endif | 1416 | #endif |