summaryrefslogtreecommitdiff
path: root/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
commit626c1329a8100ccccbe88cbfb0cda2fbf2e160c3 (patch)
treee2d31459c55df4acd56ab04ace5ed83d244b376b /cpp/src
parent5f3c95bd7845f9f583d3cab616e757deff03509c (diff)
downloadqpid-python-626c1329a8100ccccbe88cbfb0cda2fbf2e160c3.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/qpid@795223 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/qpid/cluster/Connection.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/cpp/src/qpid/cluster/Connection.cpp b/cpp/src/qpid/cluster/Connection.cpp
index ce3f922a02..a898cb5059 100644
--- a/cpp/src/qpid/cluster/Connection.cpp
+++ b/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() {