diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2017-03-01 23:43:00 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2017-03-01 23:49:02 +0300 |
commit | cf9bb9428f0065cf0ca8ef2c726933b4db2385f1 (patch) | |
tree | a9269d84be0e2ee35695b2a0448d6eb067a3cd05 /src/microhttpd/response.c | |
parent | 8314b675e5f7e6e69330c1bcb71a2703e7abc74f (diff) | |
download | libmicrohttpd-cf9bb9428f0065cf0ca8ef2c726933b4db2385f1.tar.gz libmicrohttpd-cf9bb9428f0065cf0ca8ef2c726933b4db2385f1.zip |
Watch "upgraded" sockets for OOB data and disconnects.
Currently states are only monitored. States processing have to be added.
Diffstat (limited to 'src/microhttpd/response.c')
-rw-r--r-- | src/microhttpd/response.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c index 498174e6..26ad649b 100644 --- a/src/microhttpd/response.c +++ b/src/microhttpd/response.c | |||
@@ -852,7 +852,7 @@ MHD_response_execute_upgrade_ (struct MHD_Response *response, | |||
852 | 852 | ||
853 | EXTRA_CHECK (-1 != daemon->epoll_upgrade_fd); | 853 | EXTRA_CHECK (-1 != daemon->epoll_upgrade_fd); |
854 | /* First, add network socket */ | 854 | /* First, add network socket */ |
855 | event.events = EPOLLIN | EPOLLOUT; | 855 | event.events = EPOLLIN | EPOLLOUT | EPOLLPRI; |
856 | event.data.ptr = &urh->app; | 856 | event.data.ptr = &urh->app; |
857 | if (0 != epoll_ctl (daemon->epoll_upgrade_fd, | 857 | if (0 != epoll_ctl (daemon->epoll_upgrade_fd, |
858 | EPOLL_CTL_ADD, | 858 | EPOLL_CTL_ADD, |
@@ -871,14 +871,14 @@ MHD_response_execute_upgrade_ (struct MHD_Response *response, | |||
871 | } | 871 | } |
872 | 872 | ||
873 | /* Second, add our end of the UNIX socketpair() */ | 873 | /* Second, add our end of the UNIX socketpair() */ |
874 | event.events = EPOLLIN | EPOLLOUT; | 874 | event.events = EPOLLIN | EPOLLOUT | EPOLLPRI; |
875 | event.data.ptr = &urh->mhd; | 875 | event.data.ptr = &urh->mhd; |
876 | if (0 != epoll_ctl (daemon->epoll_upgrade_fd, | 876 | if (0 != epoll_ctl (daemon->epoll_upgrade_fd, |
877 | EPOLL_CTL_ADD, | 877 | EPOLL_CTL_ADD, |
878 | urh->mhd.socket, | 878 | urh->mhd.socket, |
879 | &event)) | 879 | &event)) |
880 | { | 880 | { |
881 | event.events = EPOLLIN | EPOLLOUT; | 881 | event.events = EPOLLIN | EPOLLOUT | EPOLLPRI; |
882 | event.data.ptr = &urh->app; | 882 | event.data.ptr = &urh->app; |
883 | if (0 != epoll_ctl (daemon->epoll_upgrade_fd, | 883 | if (0 != epoll_ctl (daemon->epoll_upgrade_fd, |
884 | EPOLL_CTL_DEL, | 884 | EPOLL_CTL_DEL, |