You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2009/07/17 22:50:38 UTC

svn commit: r795223 - /qpid/trunk/qpid/cpp/src/qpid/cluster/Connection.cpp

Author: aconway
Date: Fri Jul 17 20:50:38 2009
New Revision: 795223

URL: http://svn.apache.org/viewvc?rev=795223&view=rev
Log:
Add "[shadow]" prefix to the log-ID for shadow and catch-up connections, to make them easy to identify.

Modified:
    qpid/trunk/qpid/cpp/src/qpid/cluster/Connection.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/cluster/Connection.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/cluster/Connection.cpp?rev=795223&r1=795222&r2=795223&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/cluster/Connection.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/cluster/Connection.cpp Fri Jul 17 20:50:38 2009
@@ -67,23 +67,29 @@
 
 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() {



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org