diff options
| author | Alan Conway <aconway@apache.org> | 2014-08-18 19:18:31 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2014-08-18 19:18:31 +0000 |
| commit | 601392efbbd7c4fc58cb2e42eec0e5e462e34fea (patch) | |
| tree | ee1c37da63b464c2cf0af9e0c7d66f0cd430e6c8 /qpid | |
| parent | 0b577d8ebd8c7a35ad4c84ed1bc048f21bb2d9d6 (diff) | |
| download | qpid-python-601392efbbd7c4fc58cb2e42eec0e5e462e34fea.tar.gz | |
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
Diffstat (limited to 'qpid')
| -rw-r--r-- | qpid/cpp/src/qpid/ha/QueueReplicator.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
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<QueueSnapshot> qs = queue->getObservers().findType<QueueSnapshot>(); - 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( |
