From: Mike Stepanek (mstepane) Date: Thu, 5 Jul 2018 17:31:59 +0000 (-0400) Subject: Merge pull request #1283 in SNORT/snort3 from dev_appid_perf to master X-Git-Tag: 3.0.0-246~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e7cb1752bb2cd2bd13a82d3753af4276f4ed52e3;p=thirdparty%2Fsnort3.git Merge pull request #1283 in SNORT/snort3 from dev_appid_perf to master Squashed commit of the following: commit c8a7fa9cfb07d3ca24bc5916a3ef008d2b577f4b Author: Devendra Dahiphale Date: Thu Jun 21 15:14:23 2018 -0400 appid: remove lock guard while accessing app_info_table --- diff --git a/src/network_inspectors/appid/app_info_table.cc b/src/network_inspectors/appid/app_info_table.cc index b920485df..9c66a7fe7 100644 --- a/src/network_inspectors/appid/app_info_table.cc +++ b/src/network_inspectors/appid/app_info_table.cc @@ -151,7 +151,6 @@ AppInfoTableEntry* AppInfoManager::get_app_info_entry(AppId appId, const AppInfoTable::const_iterator app; AppInfoTableEntry* entry = nullptr; - std::lock_guard lock(app_info_tables_rw_mutex); if ((tmp = get_static_app_info_entry(appId))) { app = lookup_table.find(tmp); @@ -181,7 +180,6 @@ AppInfoTableEntry* AppInfoManager::add_dynamic_app_entry(const char* app_name) return nullptr; } - std::lock_guard lock(app_info_tables_rw_mutex); AppInfoTableEntry* entry = find_app_info_by_name(app_name); if (!entry) { diff --git a/src/network_inspectors/appid/app_info_table.h b/src/network_inspectors/appid/app_info_table.h index a1793321e..d1d87ccf2 100644 --- a/src/network_inspectors/appid/app_info_table.h +++ b/src/network_inspectors/appid/app_info_table.h @@ -22,7 +22,6 @@ #ifndef APP_INFO_TABLE_H #define APP_INFO_TABLE_H -#include #include #include @@ -148,7 +147,6 @@ private: inline AppInfoManager() = default; void load_appid_config(AppIdModuleConfig*, const char* path); AppInfoTableEntry* get_app_info_entry(AppId appId, const AppInfoTable&); - std::mutex app_info_tables_rw_mutex; }; #endif