From b2efcb6ed3e1e2104836928cda81ed69f2f24559 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Sun, 5 Aug 2007 13:25:36 +0000 Subject: Added first cut of generated client interface. Old channel interface still supported; shares SessionCore with the new interface. Todo: allow applications to signal completion of received commands; keywrod args for interface. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@562866 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/client/ConnectionHandler.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cpp/src/qpid/client/ConnectionHandler.cpp') diff --git a/cpp/src/qpid/client/ConnectionHandler.cpp b/cpp/src/qpid/client/ConnectionHandler.cpp index ada3fa4fb0..f20f597d1f 100644 --- a/cpp/src/qpid/client/ConnectionHandler.cpp +++ b/cpp/src/qpid/client/ConnectionHandler.cpp @@ -175,8 +175,9 @@ void ConnectionHandler::handle(AMQMethodBody::shared_ptr method) if (method->isA()) { send(make_shared_ptr(new ConnectionCloseOkBody(version))); setState(CLOSED); - if (onClose) { - onClose(); + if (onError) { + ConnectionCloseBody::shared_ptr c(shared_polymorphic_cast(method)); + onError(c->getReplyCode(), c->getReplyText()); } } else { error(503, "Unexpected method on channel zero.", method->amqpClassId(), method->amqpMethodId()); -- cgit v1.2.1