[asterisk-scf-commits] asterisk-scf/release/logger.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Mon Feb 6 10:47:03 CST 2012


branch "master" has been updated
       via  23ee84be343bcf26f75cd325ce2e76568b3f8cd0 (commit)
      from  0c1e8150abe9fd70aa3cee59085be8486d438acd (commit)

Summary of changes:
 client/src/IceLogger.cpp                           |    4 ++-
 client/src/OstreamLogger.cpp                       |    4 ++-
 client/test/Logger-test.cpp                        |    4 ++-
 .../AsteriskSCF/Boost/FixIpcDetail.h               |   23 +++++++++++--------
 4 files changed, 22 insertions(+), 13 deletions(-)
 copy server/src/OstreamChainedLogOut.cpp => include/AsteriskSCF/Boost/FixIpcDetail.h (52%)


- Log -----------------------------------------------------------------
commit 23ee84be343bcf26f75cd325ce2e76568b3f8cd0
Author: David M. Lee <dlee at digium.com>
Date:   Mon Feb 6 10:24:16 2012 -0600

    Fixed for boost-1.48

diff --git a/client/src/IceLogger.cpp b/client/src/IceLogger.cpp
index ca1a7f7..2924142 100644
--- a/client/src/IceLogger.cpp
+++ b/client/src/IceLogger.cpp
@@ -25,6 +25,8 @@
 #include <AsteriskSCF/Logger/Level.h>
 #include <AsteriskSCF/Logger/LogConsts.h>
 
+#include <AsteriskSCF/Boost/FixIpcDetail.h>
+
 using namespace AsteriskSCF::Core::Discovery::V1;
 using namespace AsteriskSCF::System::Logging;
 
@@ -43,7 +45,7 @@ void IceLogger::logs(const std::string& name, Level logLevel,
                           logLevel, 
                           message, 
                           hostName,
-                          (Ice::Long)boost::interprocess::detail::get_current_process_id(), 
+                          (Ice::Long)boost::interprocess::ipcdetail::get_current_process_id(), 
                           mComponentCategory,
                           mComponentServiceName,
                           mComponentId);
diff --git a/client/src/OstreamLogger.cpp b/client/src/OstreamLogger.cpp
index 8d50274..b4f1221 100644
--- a/client/src/OstreamLogger.cpp
+++ b/client/src/OstreamLogger.cpp
@@ -22,6 +22,8 @@
 #include <AsteriskSCF/Logger.h>
 #include <AsteriskSCF/Logger/LogFormatter.h>
 
+#include <AsteriskSCF/Boost/FixIpcDetail.h>
+
 using namespace AsteriskSCF::System::Logging;
 
 namespace
@@ -33,7 +35,7 @@ public:
     OstreamLogger(std::ostream& out, const std::string& fmtStr = DefaultLogFormat) :
         mOut(out), mFormatter(fmtStr)
     {
-        mProcessId = (Ice::Long)boost::interprocess::detail::get_current_process_id();
+        mProcessId = (Ice::Long)boost::interprocess::ipcdetail::get_current_process_id();
 
         mHostName = boost::asio::ip::host_name();
     }
diff --git a/client/test/Logger-test.cpp b/client/test/Logger-test.cpp
index 18c48d9..8200440 100644
--- a/client/test/Logger-test.cpp
+++ b/client/test/Logger-test.cpp
@@ -24,6 +24,8 @@
 #include <AsteriskSCF/Logger.h>
 #include "ExpectedLogOut.h"
 
+#include <AsteriskSCF/Boost/FixIpcDetail.h>
+
 using namespace std;
 using namespace AsteriskSCF::System::Logging;
 
@@ -150,7 +152,7 @@ BOOST_AUTO_TEST_CASE(test_stream_timestamp)
 {
     boost::posix_time::ptime now(boost::posix_time::microsec_clock::universal_time());
 
-    Ice::Long pid = (Ice::Long)boost::interprocess::detail::get_current_process_id();
+    Ice::Long pid = (Ice::Long)boost::interprocess::ipcdetail::get_current_process_id();
     std::string nowStr = getFormattedTime(now);
 
     ExpectedLogOut out(boost::lexical_cast<std::string>(pid) + ":src:Debug:TimeStamp test:Logger-test.cpp : " + nowStr,
diff --git a/include/AsteriskSCF/Boost/FixIpcDetail.h b/include/AsteriskSCF/Boost/FixIpcDetail.h
new file mode 100644
index 0000000..eab1d9d
--- /dev/null
+++ b/include/AsteriskSCF/Boost/FixIpcDetail.h
@@ -0,0 +1,31 @@
+/*
+ * Asterisk SCF -- An open-source communications framework.
+ *
+ * Copyright (C) 2012, Digium, Inc.
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk SCF project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE.txt file
+ * at the top of the source tree.
+ */
+#pragma once
+
+// while one would think this file belongs in util-cpp, it's needed by the
+// logger client, and util-cpp depends on the logger
+
+#include <boost/interprocess/detail/os_thread_functions.hpp>
+#include <boost/version.hpp>
+
+// In Boost 1.48, detail was changes to ipcdetail to fix some bugs with MSVC
+#if BOOST_VERSION < 104800
+namespace boost {
+namespace interprocess {
+namespace ipcdetail = detail;
+}
+}
+#endif

-----------------------------------------------------------------------


-- 
asterisk-scf/release/logger.git



More information about the asterisk-scf-commits mailing list