From e754770e56a9ff0df5d5be73b04ed658cdbc5855 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Fri, 9 Feb 2007 16:46:16 +0000 Subject: Handle invalid channels. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@505360 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/lib/broker/Connection.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cpp/lib/broker/Connection.cpp') diff --git a/cpp/lib/broker/Connection.cpp b/cpp/lib/broker/Connection.cpp index 6694a0ed13..000199a65e 100644 --- a/cpp/lib/broker/Connection.cpp +++ b/cpp/lib/broker/Connection.cpp @@ -63,6 +63,11 @@ void Connection::received(qpid::framing::AMQFrame* frame){ getChannel(frame->getChannel()).handleBody(frame->getBody()); } +void Connection::close(ReplyCode code, const string& text, ClassId classId, MethodId methodId){ + client->getConnection().close(MethodContext(&getChannel(0)), code, text, classId, methodId); + getOutput().close(); +} + // TODO aconway 2007-02-02: Should be delegated to the BrokerAdapter // as it is part of the protocol. void Connection::initiated(qpid::framing::ProtocolInitiation* header) { -- cgit v1.2.1