Author: gsim
Date: Tue May 11 16:16:58 2010
New Revision: 943160

URL: http://svn.apache.org/viewvc?rev=943160&view=rev
Log:
QPID-664: Fix failover updates to set correct option name; clear list valued 
option on setting it rather than merely appending to it.

Modified:
    qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp
    qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/FailoverUpdates.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp?rev=943160&r1=943159&r2=943160&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp Tue May 11 
16:16:58 2010
@@ -65,6 +65,7 @@ bool setIfFound< std::vector<std::string
 {
     Variant::Map::const_iterator i = map.find(key);
     if (i != map.end()) {
+        value.clear();
         if (i->second.getType() == VAR_LIST) {
             convert(i->second.asList(), value);
         } else {

Modified: qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/FailoverUpdates.cpp
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/FailoverUpdates.cpp?rev=943160&r1=943159&r2=943160&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/FailoverUpdates.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/FailoverUpdates.cpp Tue May 11 
16:16:58 2010
@@ -56,7 +56,8 @@ struct FailoverUpdatesImpl : qpid::sys::
         try {
             Message message;
             while (!quit && receiver.fetch(message)) {
-                connection.setOption("urls", 
message.getProperties()["amq.failover"]);
+                connection.setOption("reconnect-urls", 
message.getProperties()["amq.failover"]);
+                QPID_LOG(debug, "Set reconnect-urls to " << 
message.getProperties()["amq.failover"]);
                 session.acknowledge();
             }
         } catch (const qpid::TransportFailure& e) {



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

Reply via email to