From f6f1900eb98cc1773a88a3ec309afa646438a384 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Wed, 31 Mar 2010 16:17:17 +0000 Subject: QPID-664: made changes suggested by Alan Conway, also moved 0-10 map/list codecs to common lib git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@929606 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/examples/messaging/drain.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'cpp/examples/messaging/drain.cpp') diff --git a/cpp/examples/messaging/drain.cpp b/cpp/examples/messaging/drain.cpp index a2fa0f1138..1215ac75d2 100644 --- a/cpp/examples/messaging/drain.cpp +++ b/cpp/examples/messaging/drain.cpp @@ -20,7 +20,6 @@ */ #include -#include #include #include #include @@ -97,14 +96,16 @@ int main(int argc, char** argv) Connection connection(options.connectionOptions); try { connection.open(options.url); - Session session = connection.newSession(); + Session session = connection.createSession(); Receiver receiver = session.createReceiver(options.address); Duration timeout = options.getTimeout(); Message message; while (receiver.fetch(message, timeout)) { std::cout << "Message(properties=" << message.getProperties() << ", content='" ; if (message.getContentType() == "amqp/map") { - std::cout << MapView(message); + Variant::Map map; + decode(message, map); + std::cout << map; } else { std::cout << message.getContent(); } -- cgit v1.2.1