From b8739308025edded01a96f97a73d822dbafc840f Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Thu, 9 Apr 2015 00:59:43 +0900 Subject: [PATCH] nghttpx: Now ocsp works without threads --- src/shrpx.cc | 7 ------- src/shrpx_connection_handler.cc | 3 +-- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/shrpx.cc b/src/shrpx.cc index d7bd884b..e225a121 100644 --- a/src/shrpx.cc +++ b/src/shrpx.cc @@ -2015,12 +2015,6 @@ int main(int argc, char **argv) { } if (!get_config()->upstream_no_tls && !get_config()->no_ocsp) { -#ifdef NOTHREADS - mod_config()->no_ocsp = true; - LOG(WARN) - << "OCSP stapling has been disabled since it requires threading but" - "threading disabled at build time."; -#else // !NOTHREADS struct stat buf; if (stat(get_config()->fetch_ocsp_response_file.get(), &buf) != 0) { mod_config()->no_ocsp = true; @@ -2028,7 +2022,6 @@ int main(int argc, char **argv) { << get_config()->fetch_ocsp_response_file.get() << " not found. OCSP stapling has been disabled."; } -#endif // !NOTHREADS } if (get_config()->downstream_addrs.empty()) { diff --git a/src/shrpx_connection_handler.cc b/src/shrpx_connection_handler.cc index c325e1ae..1fdbc867 100644 --- a/src/shrpx_connection_handler.cc +++ b/src/shrpx_connection_handler.cc @@ -355,7 +355,6 @@ void ConnectionHandler::cancel_ocsp_update() { // inspired by h2o_read_command function from h2o project: // https://github.com/h2o/h2o int ConnectionHandler::start_ocsp_update(const char *cert_file) { -#ifndef NOTHREADS int rv; int pfd[2]; @@ -426,7 +425,7 @@ int ConnectionHandler::start_ocsp_update(const char *cert_file) { ev_child_set(&ocsp_.chldev, ocsp_.pid, 0); ev_child_start(loop_, &ocsp_.chldev); -#endif // !NOTHREADS + return 0; }