From 3d05570dc824c704285bfef1ff810fbb1589f596 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Wed, 31 Oct 2007 14:50:58 +0000 Subject: Fix client side core dump when disconneced unexpectedly: void qpid::client::SessionCore::invariant() const: Assertion Minor items: src/qpid/broker/Queue.cpp: info log for each message dispatched. src/qpid/broker/SessionHandler.cpp: check attached in handleOut() src/qpid/sys/Dispatcher.cpp: use polymorphic_downcast to catch cast errors in debug builds. src/qpid/client/SessionCore.cpp: fix incorrect asserts src/qpid/client/Message.h: convenience constructor parameters git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@590688 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/broker/SessionHandler.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cpp/src/qpid/broker/SessionHandler.cpp') diff --git a/cpp/src/qpid/broker/SessionHandler.cpp b/cpp/src/qpid/broker/SessionHandler.cpp index 9b065be8af..49492ffed1 100644 --- a/cpp/src/qpid/broker/SessionHandler.cpp +++ b/cpp/src/qpid/broker/SessionHandler.cpp @@ -80,6 +80,9 @@ void SessionHandler::handleIn(AMQFrame& f) { } void SessionHandler::handleOut(AMQFrame& f) { + if (!session.get()) + throw InternalErrorException( + QPID_MSG("attempt to send frame on detached channel.")); channel.handle(f); // Send it. if (session->sent(f)) peerSession.solicitAck(); -- cgit v1.2.1