diff options
author | bju <bju@maxi.fritz.box> | 2014-01-23 22:05:58 +0100 |
---|---|---|
committer | bju <bju@maxi.fritz.box> | 2014-01-23 22:05:58 +0100 |
commit | b58cae86e52d1f34c8e007e04f2dbc28650d8789 (patch) | |
tree | 2fd8c5739f7ab4f76279a61dec6539a8532b486d /vdr-vdrmanager/select.cpp | |
parent | 612e0e00b8d55b70d4b83d13fc75e7ddd78d2b58 (diff) | |
download | vdr-manager-b58cae86e52d1f34c8e007e04f2dbc28650d8789.tar.gz vdr-manager-b58cae86e52d1f34c8e007e04f2dbc28650d8789.tar.bz2 |
- Giving VDRMANAGER_USE_{SSL,GZIP,ZLIB}=0 (default is 1) to the make call
SSL support and the compression methods can be disabled. This eliminates
the compile time and also the runtime dependencies.
- The Gentoo ebuils uses the USE flags "ssl", "gzip" and "zlib" to control
the SSL and compress features.
Diffstat (limited to 'vdr-vdrmanager/select.cpp')
-rw-r--r-- | vdr-vdrmanager/select.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/vdr-vdrmanager/select.cpp b/vdr-vdrmanager/select.cpp index 2080ad0..5e78584 100644 --- a/vdr-vdrmanager/select.cpp +++ b/vdr-vdrmanager/select.cpp @@ -134,6 +134,7 @@ int cSelect::CreatePollfds() { while (curnode) { cVdrmanagerClientSocket * sock = curnode->socket; pollfds[i].fd = sock->GetSocket(); +#if VDRMANAGER_USE_SSL if (sock->IsSSL()) { if (sock->GetSslWantsSelect() == SSL_ERROR_WANT_READ) { pollfds[i].events = POLLIN | POLLHUP; @@ -145,10 +146,13 @@ int cSelect::CreatePollfds() { pollfds[i].events |= POLLOUT; } } else { +#endif pollfds[i].events = POLLIN | POLLHUP; if (curnode->socket->WritePending()) pollfds[i].events |= POLLOUT; +#if VDRMANAGER_USE_SSL } +#endif pollfds[i++].revents = 0; curnode = curnode->next; } @@ -180,13 +184,16 @@ bool cSelect::Poll() { for (int i = (sslServersocket ? 2 : 1); i < count; i++) { cVdrmanagerClientSocket * sock = GetClientSocket(pollfds[i].fd); if (sock) { +#if VDRMANAGER_USE_SSL if ((pollfds[i].revents & (POLLIN|POLLOUT)) && sock->GetSslReadWrite() != SSL_NO_RETRY) { if (sock->GetSslReadWrite() == SSL_RETRY_READ) { handler->HandleClientRequest(sock); } else { sock->Flush(); } - } else if (pollfds[i].revents & POLLOUT) { + } else +#endif + if (pollfds[i].revents & POLLOUT) { // possibly outstanding writes sock->Flush(); } else if (pollfds[i].revents & (POLLIN | POLLHUP)) { |