summaryrefslogtreecommitdiff
path: root/cpp/src/qpid
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid')
-rw-r--r--cpp/src/qpid/agent/ManagementAgentImpl.cpp10
-rw-r--r--cpp/src/qpid/broker/Exchange.cpp6
-rw-r--r--cpp/src/qpid/broker/Queue.cpp6
-rw-r--r--cpp/src/qpid/log/posix/SinkOptions.cpp8
-rw-r--r--cpp/src/qpid/management/ManagementAgent.cpp10
-rw-r--r--cpp/src/qpid/store/MessageStorePlugin.cpp6
-rw-r--r--cpp/src/qpid/store/ms-clfs/MessageLog.cpp8
-rw-r--r--cpp/src/qpid/store/ms-clfs/TransactionLog.cpp8
-rw-r--r--cpp/src/qpid/sys/posix/AsynchIO.cpp8
-rw-r--r--cpp/src/qpid/sys/ssl/SslIo.cpp7
-rw-r--r--cpp/src/qpid/sys/windows/Socket.cpp10
-rw-r--r--cpp/src/qpid/sys/windows/SslAsynchIO.cpp8
12 files changed, 51 insertions, 44 deletions
diff --git a/cpp/src/qpid/agent/ManagementAgentImpl.cpp b/cpp/src/qpid/agent/ManagementAgentImpl.cpp
index f183ff8e0c..3f854c7510 100644
--- a/cpp/src/qpid/agent/ManagementAgentImpl.cpp
+++ b/cpp/src/qpid/agent/ManagementAgentImpl.cpp
@@ -31,9 +31,11 @@
#include <fstream>
#include <boost/lexical_cast.hpp>
+namespace qpid {
+namespace management {
+
using namespace qpid::client;
using namespace qpid::framing;
-using namespace qpid::management;
using namespace qpid::sys;
using namespace std;
using std::stringstream;
@@ -1260,7 +1262,7 @@ void ManagementAgentImpl::ConnectionThread::run()
int totalSleep = 0;
do {
sys::Mutex::ScopedUnlock _unlock(connLock);
- ::sleep(delayMin);
+ qpid::sys::sleep(delayMin);
totalSleep += delayMin;
} while (totalSleep < delay && !shutdown);
sleeping = false;
@@ -1396,8 +1398,10 @@ void ManagementAgentImpl::PublishThread::run()
sleepTime = 1;
while (totalSleep < agent.getInterval() && !shutdown) {
- ::sleep(sleepTime);
+ qpid::sys::sleep(sleepTime);
totalSleep += sleepTime;
}
}
}
+
+}} \ No newline at end of file
diff --git a/cpp/src/qpid/broker/Exchange.cpp b/cpp/src/qpid/broker/Exchange.cpp
index f311b79578..ad688ba314 100644
--- a/cpp/src/qpid/broker/Exchange.cpp
+++ b/cpp/src/qpid/broker/Exchange.cpp
@@ -32,7 +32,9 @@
#include "qpid/sys/ExceptionHolder.h"
#include <stdexcept>
-using namespace qpid::broker;
+namespace qpid {
+namespace broker {
+
using namespace qpid::framing;
using qpid::framing::Buffer;
using qpid::framing::FieldTable;
@@ -408,3 +410,5 @@ bool Exchange::routeWithAlternate(Deliverable& msg)
}
return msg.delivered;
}
+
+}} \ No newline at end of file
diff --git a/cpp/src/qpid/broker/Queue.cpp b/cpp/src/qpid/broker/Queue.cpp
index 01ce017289..d79e24ee0e 100644
--- a/cpp/src/qpid/broker/Queue.cpp
+++ b/cpp/src/qpid/broker/Queue.cpp
@@ -56,7 +56,9 @@
#include <boost/intrusive_ptr.hpp>
-using namespace qpid::broker;
+namespace qpid {
+namespace broker {
+
using namespace qpid::sys;
using namespace qpid::framing;
using qpid::management::ManagementAgent;
@@ -1706,3 +1708,5 @@ void Queue::UsageBarrier::destroy()
parent.deleted = true;
while (count) parent.messageLock.wait();
}
+
+}} \ No newline at end of file
diff --git a/cpp/src/qpid/log/posix/SinkOptions.cpp b/cpp/src/qpid/log/posix/SinkOptions.cpp
index ffa7633e3b..8459938e5c 100644
--- a/cpp/src/qpid/log/posix/SinkOptions.cpp
+++ b/cpp/src/qpid/log/posix/SinkOptions.cpp
@@ -30,6 +30,10 @@
using std::string;
using qpid::Exception;
+namespace qpid {
+namespace log {
+namespace posix {
+
namespace {
// SyslogFacilities maps from syslog values to the text equivalents.
@@ -110,10 +114,6 @@ std::string basename(const std::string path) {
} // namespace
-namespace qpid {
-namespace log {
-namespace posix {
-
std::ostream& operator<<(std::ostream& o, const SyslogFacility& f) {
return o << SyslogFacilities().name(f.value);
}
diff --git a/cpp/src/qpid/management/ManagementAgent.cpp b/cpp/src/qpid/management/ManagementAgent.cpp
index 8c2cb95faa..cb07d5d047 100644
--- a/cpp/src/qpid/management/ManagementAgent.cpp
+++ b/cpp/src/qpid/management/ManagementAgent.cpp
@@ -44,14 +44,15 @@
#include <sstream>
#include <typeinfo>
+namespace qpid {
+namespace management {
+
using boost::intrusive_ptr;
using qpid::framing::Uuid;
using qpid::types::Variant;
using qpid::amqp_0_10::MapCodec;
using qpid::amqp_0_10::ListCodec;
-using qpid::sys::Mutex;
using namespace qpid::framing;
-using namespace qpid::management;
using namespace qpid::broker;
using namespace qpid;
using namespace std;
@@ -2961,9 +2962,6 @@ bool ManagementAgent::moveDeletedObjectsLH() {
return !deleteList.empty();
}
-namespace qpid {
-namespace management {
-
namespace {
QPID_TSS const qpid::broker::ConnectionState* executionContext = 0;
}
@@ -2977,4 +2975,4 @@ const qpid::broker::ConnectionState* getManagementExecutionContext()
return executionContext;
}
-}}
+}} \ No newline at end of file
diff --git a/cpp/src/qpid/store/MessageStorePlugin.cpp b/cpp/src/qpid/store/MessageStorePlugin.cpp
index 2a8d971987..20231bf910 100644
--- a/cpp/src/qpid/store/MessageStorePlugin.cpp
+++ b/cpp/src/qpid/store/MessageStorePlugin.cpp
@@ -28,6 +28,9 @@
#include "qpid/DataDir.h"
#include "qpid/log/Statement.h"
+namespace qpid {
+namespace store {
+
/*
* The MessageStore pointer given to the Broker points to static storage.
* Thus, it cannot be deleted, especially by the broker. To prevent deletion,
@@ -42,9 +45,6 @@ namespace {
};
}
-namespace qpid {
-namespace store {
-
static MessageStorePlugin static_instance_registers_plugin;
diff --git a/cpp/src/qpid/store/ms-clfs/MessageLog.cpp b/cpp/src/qpid/store/ms-clfs/MessageLog.cpp
index 14d63a4cd4..849a0a44e8 100644
--- a/cpp/src/qpid/store/ms-clfs/MessageLog.cpp
+++ b/cpp/src/qpid/store/ms-clfs/MessageLog.cpp
@@ -32,6 +32,10 @@
#include "MessageLog.h"
#include "Lsn.h"
+namespace qpid {
+namespace store {
+namespace ms_clfs {
+
namespace {
// Structures that hold log records. Each has a type field at the start.
@@ -97,10 +101,6 @@ struct MessageDequeue {
} // namespace
-namespace qpid {
-namespace store {
-namespace ms_clfs {
-
void
MessageLog::initialize()
{
diff --git a/cpp/src/qpid/store/ms-clfs/TransactionLog.cpp b/cpp/src/qpid/store/ms-clfs/TransactionLog.cpp
index 04780e83e8..0ef046d7c8 100644
--- a/cpp/src/qpid/store/ms-clfs/TransactionLog.cpp
+++ b/cpp/src/qpid/store/ms-clfs/TransactionLog.cpp
@@ -33,6 +33,10 @@
#include "Transaction.h"
#include "Lsn.h"
+namespace qpid {
+namespace store {
+namespace ms_clfs {
+
namespace {
// Structures that hold log records. Each has a type field at the start.
@@ -95,10 +99,6 @@ struct TransactionDelete {
} // namespace
-namespace qpid {
-namespace store {
-namespace ms_clfs {
-
void
TransactionLog::initialize()
{
diff --git a/cpp/src/qpid/sys/posix/AsynchIO.cpp b/cpp/src/qpid/sys/posix/AsynchIO.cpp
index c25159985e..01ff8b6bfa 100644
--- a/cpp/src/qpid/sys/posix/AsynchIO.cpp
+++ b/cpp/src/qpid/sys/posix/AsynchIO.cpp
@@ -41,7 +41,9 @@
#include <boost/bind.hpp>
#include <boost/lexical_cast.hpp>
-using namespace qpid::sys;
+namespace qpid {
+namespace sys {
+namespace posix {
namespace {
@@ -71,10 +73,6 @@ __thread int64_t threadMaxIoTimeNs = 2 * 1000000; // start at 2ms
/*
* Asynch Acceptor
*/
-namespace qpid {
-namespace sys {
-namespace posix {
-
class AsynchAcceptor : public qpid::sys::AsynchAcceptor {
public:
AsynchAcceptor(const Socket& s, AsynchAcceptor::Callback callback);
diff --git a/cpp/src/qpid/sys/ssl/SslIo.cpp b/cpp/src/qpid/sys/ssl/SslIo.cpp
index 73f15617dc..2a7cf16923 100644
--- a/cpp/src/qpid/sys/ssl/SslIo.cpp
+++ b/cpp/src/qpid/sys/ssl/SslIo.cpp
@@ -37,8 +37,9 @@
#include <boost/bind.hpp>
-using namespace qpid::sys;
-using namespace qpid::sys::ssl;
+namespace qpid {
+namespace sys {
+namespace ssl {
namespace {
@@ -448,3 +449,5 @@ SecuritySettings SslIO::getSecuritySettings() {
settings.authid = socket.getClientAuthId();
return settings;
}
+
+}}}
diff --git a/cpp/src/qpid/sys/windows/Socket.cpp b/cpp/src/qpid/sys/windows/Socket.cpp
index 1fa4768329..b085f67539 100644
--- a/cpp/src/qpid/sys/windows/Socket.cpp
+++ b/cpp/src/qpid/sys/windows/Socket.cpp
@@ -32,6 +32,9 @@
#include <winsock2.h>
+namespace qpid {
+namespace sys {
+
// Need to initialize WinSock. Ideally, this would be a singleton or embedded
// in some one-time initialization function. I tried boost singleton and could
// not get it to compile (and others located in google had the same problem).
@@ -76,13 +79,6 @@ protected:
static WinSockSetup setup;
-} /* namespace */
-
-namespace qpid {
-namespace sys {
-
-namespace {
-
std::string getName(SOCKET fd, bool local)
{
::sockaddr_storage name_s; // big enough for any socket address
diff --git a/cpp/src/qpid/sys/windows/SslAsynchIO.cpp b/cpp/src/qpid/sys/windows/SslAsynchIO.cpp
index 11a3389e45..25cc94b290 100644
--- a/cpp/src/qpid/sys/windows/SslAsynchIO.cpp
+++ b/cpp/src/qpid/sys/windows/SslAsynchIO.cpp
@@ -38,6 +38,10 @@
#include <queue>
#include <boost/bind.hpp>
+namespace qpid {
+namespace sys {
+namespace windows {
+
namespace {
/*
@@ -66,10 +70,6 @@ namespace {
};
}
-namespace qpid {
-namespace sys {
-namespace windows {
-
SslAsynchIO::SslAsynchIO(const qpid::sys::Socket& s,
CredHandle hCred,
ReadCallback rCb,