qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kp...@apache.org
Subject svn commit: r890965 - /qpid/trunk/qpid/cpp/src/qpid/broker/Exchange.cpp
Date Tue, 15 Dec 2009 20:07:25 GMT
Author: kpvdr
Date: Tue Dec 15 20:07:25 2009
New Revision: 890965

URL: http://svn.apache.org/viewvc?rev=890965&view=rev
Log:
Fix for QPID-2278 - "Store recovery compatibility problem introduced by alternate-exchange
fix"

Modified:
    qpid/trunk/qpid/cpp/src/qpid/broker/Exchange.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/Exchange.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/Exchange.cpp?rev=890965&r1=890964&r2=890965&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/Exchange.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/Exchange.cpp Tue Dec 15 20:07:25 2009
@@ -209,8 +209,10 @@
     buffer.getShortString(name);
     bool durable(buffer.getOctet());
     buffer.getShortString(type);
-    buffer.getShortString(altName);
     buffer.get(args);
+    // For backwards compatibility on restoring exchanges from before the alt-exchange update,
perform check
+    if (buffer.available())
+        buffer.getShortString(altName);
 
     try {
         Exchange::shared_ptr exch = exchanges.declare(name, type, durable, args).first;
@@ -228,10 +230,10 @@
     buffer.putShortString(name);
     buffer.putOctet(durable);
     buffer.putShortString(getType());
-    buffer.putShortString(alternate.get() ? alternate->getName() : string(""));
     if (args.isSet(qpidSequenceCounter))
         args.setInt64(std::string(qpidSequenceCounter),sequenceNo);
     buffer.put(args);
+    buffer.putShortString(alternate.get() ? alternate->getName() : string(""));
 }
 
 uint32_t Exchange::encodedSize() const



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


Mime
View raw message