You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2014/08/18 21:18:31 UTC
svn commit: r1618712 - /qpid/trunk/qpid/cpp/src/qpid/ha/QueueReplicator.cpp
Author: aconway
Date: Mon Aug 18 19:18:31 2014
New Revision: 1618712
URL: http://svn.apache.org/r1618712
Log:
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.
Modified:
qpid/trunk/qpid/cpp/src/qpid/ha/QueueReplicator.cpp
Modified: qpid/trunk/qpid/cpp/src/qpid/ha/QueueReplicator.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/ha/QueueReplicator.cpp?rev=1618712&r1=1618711&r2=1618712&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/ha/QueueReplicator.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/ha/QueueReplicator.cpp Mon Aug 18 19:18:31 2014
@@ -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(B
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(
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org