diff --git a/contrib/epee/include/misc_log_ex.h b/contrib/epee/include/misc_log_ex.h index c74378fc..412cb504 100644 --- a/contrib/epee/include/misc_log_ex.h +++ b/contrib/epee/include/misc_log_ex.h @@ -893,12 +893,10 @@ namespace log_space FAST_CRITICAL_REGION_END(); return true; } - std::string get_thread_prefix() { FAST_CRITICAL_REGION_LOCAL(m_critical_sec); return m_thr_prefix_strings[misc_utils::get_thread_string_id()]; - } std::string get_default_log_file() @@ -1160,7 +1158,6 @@ namespace log_space } - static bool add_logger( ibase_log_stream* pstream, int log_level_limit = LOG_LEVEL_4 ) { logger* plogger = get_or_create_instance(); @@ -1234,8 +1231,6 @@ POP_WARNINGS } - - #ifdef _MSC_VER @@ -1290,8 +1285,6 @@ POP_WARNINGS return plogger->get_thread_prefix(); } - - static std::string get_prefix_entry() { std::stringstream str_prefix; @@ -1587,8 +1580,6 @@ POP_WARNINGS #endif - - #define LOG_PRINT_NO_POSTFIX(mess, level) LOG_PRINT_NO_POSTFIX2(LOG_DEFAULT_TARGET, mess, level) #define LOG_PRINT_NO_PREFIX(mess, level) LOG_PRINT_NO_PREFIX2(LOG_DEFAULT_TARGET, mess, level) #define LOG_PRINT_NO_PREFIX_NO_POSTFIX(mess, level) LOG_PRINT_NO_PREFIX_NO_POSTFIX2(LOG_DEFAULT_TARGET, mess, level) @@ -1694,7 +1685,6 @@ POP_WARNINGS #define CHECK_AND_ASSERT_MES2(expr, message) do{if(!(expr)) {LOG_ERROR(message); };}while(0) #endif - } POP_WARNINGS diff --git a/contrib/epee/include/net/http_protocol_handler.inl b/contrib/epee/include/net/http_protocol_handler.inl index dbc424af..b84bf47c 100644 --- a/contrib/epee/include/net/http_protocol_handler.inl +++ b/contrib/epee/include/net/http_protocol_handler.inl @@ -345,7 +345,7 @@ namespace net_utils template bool simple_http_connection_handler::handle_invoke_query_line() { - LOG_FRAME("simple_http_connection_handler::handle_recognize_protocol_out(*)", LOG_LEVEL_3); + LOG_FRAME("simple_http_connection_handler::handle_invoke_query_line(*)", LOG_LEVEL_3); STATIC_REGEXP_EXPR_1(rexp_match_command_line, "^(((OPTIONS)|(GET)|(HEAD)|(POST)|(PUT)|(DELETE)|(TRACE)) (\\S+) HTTP/(\\d+).(\\d+))\r?\n", boost::regex::icase | boost::regex::normal); // 123 4 5 6 7 8 9 10 11 12 @@ -693,4 +693,4 @@ namespace net_utils POP_WARNINGS //-------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------- -//-------------------------------------------------------------------------------------------- \ No newline at end of file +//-------------------------------------------------------------------------------------------- diff --git a/contrib/epee/include/syncobj.h b/contrib/epee/include/syncobj.h index f20bff07..c31b5e0c 100644 --- a/contrib/epee/include/syncobj.h +++ b/contrib/epee/include/syncobj.h @@ -701,6 +701,11 @@ namespace epee #define CRITICAL_REGION_BEGIN1(x) CRITICAL_REGION_BEGIN_VAR(x, critical_region_var1) #define CRITICAL_REGION_END() } +#define SHARED_CRITICAL_REGION_LOCAL(x) boost::shared_lock< boost::shared_mutex > critical_region_var(x) +#define EXCLUSIVE_CRITICAL_REGION_LOCAL(x) boost::unique_lock< boost::shared_mutex > critical_region_var(x) + +#define SHARED_CRITICAL_REGION_BEGIN(x) { SHARED_CRITICAL_REGION_LOCAL(x) +#define EXCLUSIVE_CRITICAL_REGION_BEGIN(x) { EXCLUSIVE_CRITICAL_REGION_LOCAL(x) }