aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/dns_utils.cpp8
-rw-r--r--src/common/dns_utils.h4
-rw-r--r--src/common/scoped_message_writer.h2
3 files changed, 5 insertions, 9 deletions
diff --git a/src/common/dns_utils.cpp b/src/common/dns_utils.cpp
index b3b464e92..e7ff11c5c 100644
--- a/src/common/dns_utils.cpp
+++ b/src/common/dns_utils.cpp
@@ -304,12 +304,8 @@ DNSResolver& DNSResolver::instance()
{
boost::lock_guard<boost::mutex> lock(instance_lock);
- static DNSResolver* staticInstance = NULL;
- if (staticInstance == NULL)
- {
- staticInstance = new DNSResolver();
- }
- return *staticInstance;
+ static DNSResolver staticInstance;
+ return staticInstance;
}
DNSResolver DNSResolver::create()
diff --git a/src/common/dns_utils.h b/src/common/dns_utils.h
index 1f5cb4e7f..69b32f435 100644
--- a/src/common/dns_utils.h
+++ b/src/common/dns_utils.h
@@ -101,7 +101,7 @@ public:
*
* @return A vector of strings containing a TXT record; or an empty vector
*/
- // TODO: modify this to accomodate DNSSEC
+ // TODO: modify this to accommodate DNSSEC
std::vector<std::string> get_txt_record(const std::string& url, bool& dnssec_available, bool& dnssec_valid);
/**
@@ -142,7 +142,7 @@ private:
*
* @return A vector of strings containing the requested record; or an empty vector
*/
- // TODO: modify this to accomodate DNSSEC
+ // TODO: modify this to accommodate DNSSEC
std::vector<std::string> get_record(const std::string& url, int record_type, std::string (*reader)(const char *,size_t), bool& dnssec_available, bool& dnssec_valid);
/**
diff --git a/src/common/scoped_message_writer.h b/src/common/scoped_message_writer.h
index 7ee4f1379..e31f8f0b2 100644
--- a/src/common/scoped_message_writer.h
+++ b/src/common/scoped_message_writer.h
@@ -91,7 +91,7 @@ public:
{
m_flush = false;
- MCLOG(m_log_level, "msgwriter", m_oss.str());
+ MCLOG_FILE(m_log_level, "msgwriter", m_oss.str());
if (epee::console_color_default == m_color)
{