Author: astitcher
Date: 2007-10-16 11:03:48 -0400 (Tue, 16 Oct 2007)
New Revision: 1084
Modified:
store/trunk/cpp/lib/BdbMessageStore.cpp
store/trunk/cpp/lib/BindingDbt.cpp
store/trunk/cpp/tests/SimpleTest.cpp
Log:
Fixed for change in field table API
Modified: store/trunk/cpp/lib/BdbMessageStore.cpp
===================================================================
--- store/trunk/cpp/lib/BdbMessageStore.cpp 2007-10-16 14:49:55 UTC (rev 1083)
+++ store/trunk/cpp/lib/BdbMessageStore.cpp 2007-10-16 15:03:48 UTC (rev 1084)
@@ -369,7 +369,7 @@
FieldTable args;
buffer.getShortString(queueName);
buffer.getShortString(routingkey);
- buffer.getFieldTable(args);
+ buffer.get(args);
exchange_index::iterator exchange = exchanges.find(key.id);
queue_index::iterator queue = queues.find(queueId);
if (exchange != exchanges.end() && queue != queues.end()) {
Modified: store/trunk/cpp/lib/BindingDbt.cpp
===================================================================
--- store/trunk/cpp/lib/BindingDbt.cpp 2007-10-16 14:49:55 UTC (rev 1083)
+++ store/trunk/cpp/lib/BindingDbt.cpp 2007-10-16 15:03:48 UTC (rev 1084)
@@ -37,7 +37,7 @@
buffer.putLongLong(q.getPersistenceId());
buffer.putShortString(q.getName());
buffer.putShortString(k);
- buffer.putFieldTable(a);
+ buffer.put(a);
set_data(data);
set_size(encodedSize(e, q, k, a));
Modified: store/trunk/cpp/tests/SimpleTest.cpp
===================================================================
--- store/trunk/cpp/tests/SimpleTest.cpp 2007-10-16 14:49:55 UTC (rev 1083)
+++ store/trunk/cpp/tests/SimpleTest.cpp 2007-10-16 15:03:48 UTC (rev 1084)
@@ -30,6 +30,7 @@
#include <qpid/framing/AMQHeaderBody.h>
#include <qpid/framing/AMQMethodBody.h>
#include <qpid/framing/ChannelAdapter.h>
+#include <qpid/framing/FieldValue.h>
#include <qpid/broker/Message.h>
#include <qpid/broker/Queue.h>
#include <qpid/broker/DirectExchange.h>
@@ -224,7 +225,7 @@
CPPUNIT_ASSERT_EQUAL(routingKey, msg->getRoutingKey());
CPPUNIT_ASSERT_EQUAL(messageId,
msg->getProperties<MessageProperties>()->getMessageId());
CPPUNIT_ASSERT_EQUAL((uint8_t) PERSISTENT,
msg->getProperties<DeliveryProperties>()->getDeliveryMode());
- CPPUNIT_ASSERT_EQUAL(string("xyz"),
msg->getProperties<MessageProperties>()->getApplicationHeaders().getString("abc"));
+ CPPUNIT_ASSERT(StringValue("xyz") ==
*msg->getProperties<MessageProperties>()->getApplicationHeaders().get("abc"));
CPPUNIT_ASSERT_EQUAL((u_int64_t) 14, msg->contentSize());
DummyHandler handler;
@@ -339,7 +340,7 @@
CPPUNIT_ASSERT_EQUAL(routingKey, msg->getRoutingKey());
CPPUNIT_ASSERT_EQUAL(messageId,
msg->getProperties<MessageProperties>()->getMessageId());
CPPUNIT_ASSERT_EQUAL((uint8_t) PERSISTENT,
msg->getProperties<DeliveryProperties>()->getDeliveryMode());
- CPPUNIT_ASSERT_EQUAL(string("xyz"),
msg->getProperties<MessageProperties>()->getApplicationHeaders().getString("abc"));
+ CPPUNIT_ASSERT(StringValue("xyz") ==
*msg->getProperties<MessageProperties>()->getApplicationHeaders().get("abc"));
CPPUNIT_ASSERT_EQUAL((u_int64_t) (data1.size() + data2.size()),
msg->getFrames().getHeaders()->getContentLength());
CPPUNIT_ASSERT_EQUAL((u_int64_t) 0, msg->contentSize());//ensure it is
being lazily loaded
@@ -432,7 +433,7 @@
CPPUNIT_ASSERT_EQUAL(id, exchange->getPersistenceId());
CPPUNIT_ASSERT_EQUAL(type, exchange->getType());
CPPUNIT_ASSERT(exchange->isDurable());
- CPPUNIT_ASSERT_EQUAL(args.getString("a"),
exchange->getArgs().getString("a"));
+ CPPUNIT_ASSERT_EQUAL(*args.get("a"),
*exchange->getArgs().get("a"));
store.destroy(*exchange);
}
{
Show replies by date