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/sys/Dispatcher.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cpp/src/qpid/sys') diff --git a/cpp/src/qpid/sys/Dispatcher.cpp b/cpp/src/qpid/sys/Dispatcher.cpp index b8751168c2..d49af9d079 100644 --- a/cpp/src/qpid/sys/Dispatcher.cpp +++ b/cpp/src/qpid/sys/Dispatcher.cpp @@ -21,6 +21,8 @@ #include "Dispatcher.h" +#include + #include namespace qpid { @@ -36,7 +38,8 @@ Dispatcher::~Dispatcher() { void Dispatcher::run() { do { Poller::Event event = poller->wait(); - DispatchHandle* h = static_cast(event.handle); + DispatchHandle* h = + boost::polymorphic_downcast(event.handle); // If can read/write then dispatch appropriate callbacks if (h) { -- cgit v1.2.1