From b4dac41573e33e1a04a2b7b8c9a35f5e72b662bc Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Mon, 3 Mar 2008 14:49:06 +0000 Subject: A further step to final 0-10 spec. The extra.xml fragment adds class defs for connection in session that are in line with latest spec but use old schema. The preview codepath (99-0) remains unaltered. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@633108 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/broker/ConnectionHandler.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'cpp/src/qpid/broker/ConnectionHandler.cpp') diff --git a/cpp/src/qpid/broker/ConnectionHandler.cpp b/cpp/src/qpid/broker/ConnectionHandler.cpp index e296d52214..126e1b2723 100644 --- a/cpp/src/qpid/broker/ConnectionHandler.cpp +++ b/cpp/src/qpid/broker/ConnectionHandler.cpp @@ -23,6 +23,7 @@ #include "ConnectionHandler.h" #include "Connection.h" #include "qpid/framing/ConnectionStartBody.h" +#include "qpid/framing/Connection010StartBody.h" #include "qpid/framing/ClientInvoker.h" #include "qpid/framing/ServerInvoker.h" @@ -38,11 +39,14 @@ const std::string en_US = "en_US"; } void ConnectionHandler::init(const framing::ProtocolInitiation& header) { + //need to send out a protocol header back to the client + handler->connection.getOutput().initiated(header); + FieldTable properties; string mechanisms(PLAIN); string locales(en_US); - handler->serverMode = true; - handler->client.start(header.getMajor(), header.getMinor(), properties, mechanisms, locales); + handler->serverMode = true; + handler->client.start(properties, mechanisms, locales); } void ConnectionHandler::close(ReplyCode code, const string& text, ClassId classId, MethodId methodId) @@ -55,7 +59,7 @@ void ConnectionHandler::handle(framing::AMQFrame& frame) AMQMethodBody* method=frame.getBody()->getMethod(); try{ if (handler->serverMode) { - if (!invoke(static_cast(*handler.get()), *method)) + if (!invoke(static_cast(*handler.get()), *method)) throw ChannelErrorException(QPID_MSG("Class can't be accessed over channel 0")); } else { if (!invoke(static_cast(*handler.get()), *method)) -- cgit v1.2.1