From 601392efbbd7c4fc58cb2e42eec0e5e462e34fea Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Mon, 18 Aug 2014 19:18:31 +0000 Subject: QPID-6015: HA Python QMF console raises exception due to HA subscriptions. One of the arguments in a HA subscription (qpid.ha-ids) is binary encoded data, however it was being passed as a string type in the arguments map. This caused python qmf console clients to choke when they tried to utf-decode the data. Fix is to pass the data using the vbin32 type which is intended for binary data. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1618712 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/qpid/ha/QueueReplicator.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'qpid/cpp') diff --git a/qpid/cpp/src/qpid/ha/QueueReplicator.cpp b/qpid/cpp/src/qpid/ha/QueueReplicator.cpp index ca06fabe86..4abbb3affb 100644 --- a/qpid/cpp/src/qpid/ha/QueueReplicator.cpp +++ b/qpid/cpp/src/qpid/ha/QueueReplicator.cpp @@ -35,6 +35,7 @@ #include "qpid/broker/QueueRegistry.h" #include "qpid/broker/SessionHandler.h" #include "qpid/framing/FieldTable.h" +#include "qpid/framing/FieldValue.h" #include "qpid/log/Statement.h" #include "qpid/Msg.h" #include "qpid/assert.h" @@ -254,7 +255,9 @@ void QueueReplicator::initializeBridge(Bridge& bridge, SessionHandler& sessionHa arguments.setInt(QPID_SYNC_FREQUENCY, 1); // TODO aconway 2012-05-22: optimize? arguments.setTable(ReplicatingSubscription::QPID_BROKER_INFO, brokerInfo.asFieldTable()); boost::shared_ptr qs = queue->getObservers().findType(); - if (qs) arguments.setString(ReplicatingSubscription::QPID_ID_SET, encodeStr(qs->getSnapshot())); + if (qs) arguments.set(ReplicatingSubscription::QPID_ID_SET, + FieldTable::ValuePtr( + new Var32Value(encodeStr(qs->getSnapshot()), TYPE_CODE_VBIN32))); try { peer.getMessage().subscribe( -- cgit v1.2.1