summaryrefslogtreecommitdiff
path: root/qpid/cpp/src
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2009-07-17 20:50:38 +0000
committerAlan Conway <aconway@apache.org>2009-07-17 20:50:38 +0000
commit235d9b85e60031759ef937bec0a28b9b2ff33b29 (patch)
tree79d90a7f6619ba4e79c5a5a82f5548b069f4dc2b /qpid/cpp/src
parent25af886b09b809687a38870a3b815902df69e8e3 (diff)
downloadqpid-python-235d9b85e60031759ef937bec0a28b9b2ff33b29.tar.gz
Add "[shadow]" prefix to the log-ID for shadow and catch-up connections, to make them easy to identify.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@795223 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
-rw-r--r--qpid/cpp/src/qpid/cluster/Connection.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/qpid/cpp/src/qpid/cluster/Connection.cpp b/qpid/cpp/src/qpid/cluster/Connection.cpp
index ce3f922a02..a898cb5059 100644
--- a/qpid/cpp/src/qpid/cluster/Connection.cpp
+++ b/qpid/cpp/src/qpid/cluster/Connection.cpp
@@ -67,23 +67,29 @@ struct NullFrameHandler : public framing::FrameHandler {
namespace {
sys::AtomicValue<uint64_t> idCounter;
+const std::string shadowPrefix("[shadow]");
}
+
// Shadow connection
Connection::Connection(Cluster& c, sys::ConnectionOutputHandler& out, const std::string& logId, const ConnectionId& id)
: cluster(c), self(id), catchUp(false), output(*this, out),
- connection(&output, cluster.getBroker(), logId), expectProtocolHeader(false),
+ connection(&output, cluster.getBroker(), shadowPrefix+logId), expectProtocolHeader(false),
mcastFrameHandler(cluster.getMulticast(), self),
consumerNumbering(c.getUpdateReceiver().consumerNumbering)
{ init(); }
// Local connection
Connection::Connection(Cluster& c, sys::ConnectionOutputHandler& out,
- const std::string& logId, MemberId member, bool isCatchUp, bool isLink)
- : cluster(c), self(member, ++idCounter), catchUp(isCatchUp), output(*this, out),
- connection(&output, cluster.getBroker(), logId, isLink, catchUp ? ++catchUpId : 0),
- expectProtocolHeader(isLink), mcastFrameHandler(cluster.getMulticast(), self),
- consumerNumbering(c.getUpdateReceiver().consumerNumbering)
+ const std::string& logId, MemberId member,
+ bool isCatchUp, bool isLink
+) : cluster(c), self(member, ++idCounter), catchUp(isCatchUp), output(*this, out),
+ connection(&output, cluster.getBroker(),
+ isCatchUp ? shadowPrefix+logId : logId,
+ isLink,
+ isCatchUp ? ++catchUpId : 0),
+ expectProtocolHeader(isLink), mcastFrameHandler(cluster.getMulticast(), self),
+ consumerNumbering(c.getUpdateReceiver().consumerNumbering)
{ init(); }
void Connection::init() {