summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2010-05-11 16:16:58 +0000
committerGordon Sim <gsim@apache.org>2010-05-11 16:16:58 +0000
commit4a389bb70151108e097a05a06c7a4148ec1e5252 (patch)
tree8aea4f97d6c70b2b5283c4a3f70b65b378b2a56c /cpp/src
parent16da0e0c511c0c1cf4ea592640c522754065200a (diff)
downloadqpid-python-4a389bb70151108e097a05a06c7a4148ec1e5252.tar.gz
QPID-664: Fix failover updates to set correct option name; clear list valued option on setting it rather than merely appending to it.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@943160 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp1
-rw-r--r--cpp/src/qpid/client/amqp0_10/FailoverUpdates.cpp3
2 files changed, 3 insertions, 1 deletions
diff --git a/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp b/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp
index 6c3c9c5218..a1f285f5a9 100644
--- a/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp
+++ b/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp
@@ -65,6 +65,7 @@ bool setIfFound< std::vector<std::string> >(const Variant::Map& map,
{
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 {
diff --git a/cpp/src/qpid/client/amqp0_10/FailoverUpdates.cpp b/cpp/src/qpid/client/amqp0_10/FailoverUpdates.cpp
index 354d6f6aba..2ae882cee9 100644
--- a/cpp/src/qpid/client/amqp0_10/FailoverUpdates.cpp
+++ b/cpp/src/qpid/client/amqp0_10/FailoverUpdates.cpp
@@ -56,7 +56,8 @@ struct FailoverUpdatesImpl : qpid::sys::Runnable
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) {