diff options
author | Jack Lloyd <[email protected]> | 2016-10-12 16:18:51 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-10-12 16:18:51 -0400 |
commit | 7a40d6c03012bde4e06d65b92bf06ccab2b73d93 (patch) | |
tree | 6baa3089ab722b87e169b97e970c16d689e51acf /src/lib/asn1 | |
parent | ed9e147695e4c5e800e83654baf365a634f3a2a7 (diff) |
Fix mutex in oids.cpp
Remove bogus includes for TLS tests
Diffstat (limited to 'src/lib/asn1')
-rw-r--r-- | src/lib/asn1/oid_lookup/oids.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/asn1/oid_lookup/oids.cpp b/src/lib/asn1/oid_lookup/oids.cpp index f49a3daf3..8ee10b75a 100644 --- a/src/lib/asn1/oid_lookup/oids.cpp +++ b/src/lib/asn1/oid_lookup/oids.cpp @@ -27,7 +27,7 @@ class OID_Map void add_str2oid(const OID& oid, const std::string& str) { - std::lock_guard<std::mutex> lock(m_mutex); + lock_guard_type<mutex_type> lock(m_mutex); auto i = m_str2oid.find(str); if(i == m_str2oid.end()) m_str2oid.insert(std::make_pair(str, oid)); @@ -35,7 +35,7 @@ class OID_Map void add_oid2str(const OID& oid, const std::string& str) { - std::lock_guard<std::mutex> lock(m_mutex); + lock_guard_type<mutex_type> lock(m_mutex); auto i = m_oid2str.find(oid); if(i == m_oid2str.end()) m_oid2str.insert(std::make_pair(oid, str)); @@ -43,7 +43,7 @@ class OID_Map std::string lookup(const OID& oid) { - std::lock_guard<std::mutex> lock(m_mutex); + lock_guard_type<mutex_type> lock(m_mutex); auto i = m_oid2str.find(oid); if(i != m_oid2str.end()) @@ -54,7 +54,7 @@ class OID_Map OID lookup(const std::string& str) { - std::lock_guard<std::mutex> lock(m_mutex); + lock_guard_type<mutex_type> lock(m_mutex); auto i = m_str2oid.find(str); if(i != m_str2oid.end()) @@ -72,7 +72,7 @@ class OID_Map bool have_oid(const std::string& str) { - std::lock_guard<std::mutex> lock(m_mutex); + lock_guard_type<mutex_type> lock(m_mutex); return m_str2oid.find(str) != m_str2oid.end(); } @@ -92,14 +92,14 @@ class OID_Map read_cfg(cfg, "builtin"); } - std::mutex m_mutex; + mutex_type m_mutex; std::map<std::string, OID> m_str2oid; std::map<OID, std::string> m_oid2str; }; void OID_Map::read_cfg(std::istream& cfg, const std::string& source) { - std::lock_guard<std::mutex> lock(m_mutex); + lock_guard_type<mutex_type> lock(m_mutex); size_t line = 0; |