aboutsummaryrefslogtreecommitdiff
path: root/src/httpserver.cpp
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2019-05-24 15:18:42 +0200
committerpracticalswift <practicalswift@users.noreply.github.com>2019-05-25 23:23:11 +0200
commitfb434159d18e8077ae2d31e1a54c2f8248a6366a (patch)
treecb027f5229c756832058bc7ca74475cb6a3a7e9d /src/httpserver.cpp
parent63b9efa73d6bec280241fe0fa06abf7e5b4dde8d (diff)
downloadbitcoin-fb434159d18e8077ae2d31e1a54c2f8248a6366a.tar.xz
Remove global symbols: Avoid using the global namespace if possible
Rename CCriticalSection to RecursiveMutex (both are AnnotatedMixin<std::recursive_mutex>) ``` $ git grep -E '(typedef|using).*(CCriticalSection|RecursiveMutex)' src/sync.h:using RecursiveMutex = AnnotatedMixin<std::recursive_mutex>; src/sync.h:typedef AnnotatedMixin<std::recursive_mutex> CCriticalSection; ```
Diffstat (limited to 'src/httpserver.cpp')
-rw-r--r--src/httpserver.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/httpserver.cpp b/src/httpserver.cpp
index 63639fa3e0..d17667223b 100644
--- a/src/httpserver.cpp
+++ b/src/httpserver.cpp
@@ -139,15 +139,15 @@ struct HTTPPathHandler
//! libevent event loop
static struct event_base* eventBase = nullptr;
//! HTTP server
-struct evhttp* eventHTTP = nullptr;
+static struct evhttp* eventHTTP = nullptr;
//! List of subnets to allow RPC connections from
static std::vector<CSubNet> rpc_allow_subnets;
//! Work queue for handling longer requests off the event loop thread
static WorkQueue<HTTPClosure>* workQueue = nullptr;
//! Handlers for (sub)paths
-std::vector<HTTPPathHandler> pathHandlers;
+static std::vector<HTTPPathHandler> pathHandlers;
//! Bound listening sockets
-std::vector<evhttp_bound_socket *> boundSockets;
+static std::vector<evhttp_bound_socket *> boundSockets;
/** Check if a network address is allowed to access the HTTP server */
static bool ClientAllowed(const CNetAddr& netaddr)
@@ -420,7 +420,7 @@ bool UpdateHTTPServerLogging(bool enable) {
#endif
}
-std::thread threadHTTP;
+static std::thread threadHTTP;
static std::vector<std::thread> g_thread_http_workers;
void StartHTTPServer()