aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/epee/include/net/http_protocol_handler.inl2
-rw-r--r--external/easylogging++/easylogging++.cc7
2 files changed, 5 insertions, 4 deletions
diff --git a/contrib/epee/include/net/http_protocol_handler.inl b/contrib/epee/include/net/http_protocol_handler.inl
index 19bdf4ff0..0f4a28c99 100644
--- a/contrib/epee/include/net/http_protocol_handler.inl
+++ b/contrib/epee/include/net/http_protocol_handler.inl
@@ -668,7 +668,7 @@ namespace net_utils
// Cross-origin resource sharing
if(m_query_info.m_header_info.m_origin.size())
{
- if (std::binary_search(m_config.m_access_control_origins.begin(), m_config.m_access_control_origins.end(), m_query_info.m_header_info.m_origin))
+ if (std::binary_search(m_config.m_access_control_origins.begin(), m_config.m_access_control_origins.end(), "*") || std::binary_search(m_config.m_access_control_origins.begin(), m_config.m_access_control_origins.end(), m_query_info.m_header_info.m_origin))
{
buf += "Access-Control-Allow-Origin: ";
buf += m_query_info.m_header_info.m_origin;
diff --git a/external/easylogging++/easylogging++.cc b/external/easylogging++/easylogging++.cc
index bf877c018..cffc63a23 100644
--- a/external/easylogging++/easylogging++.cc
+++ b/external/easylogging++/easylogging++.cc
@@ -2968,8 +2968,8 @@ void Writer::initializeLogger(Logger *logger, bool needLock) {
}
void Writer::processDispatch() {
- static std::atomic_flag in_dispatch;
- if (in_dispatch.test_and_set())
+ static __thread bool in_dispatch = false;
+ if (in_dispatch)
{
if (m_proceed && m_logger != NULL)
{
@@ -2978,6 +2978,7 @@ void Writer::processDispatch() {
}
return;
}
+ in_dispatch = true;
#if ELPP_LOGGING_ENABLED
if (ELPP->hasFlag(LoggingFlag::MultiLoggerSupport)) {
bool firstDispatched = false;
@@ -3016,7 +3017,7 @@ void Writer::processDispatch() {
m_logger->releaseLock();
}
#endif // ELPP_LOGGING_ENABLED
- in_dispatch.clear();
+ in_dispatch = false;
}
void Writer::triggerDispatch(void) {