diff options
author | Alan Conway <aconway@apache.org> | 2007-10-31 14:50:58 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2007-10-31 14:50:58 +0000 |
commit | 3d05570dc824c704285bfef1ff810fbb1589f596 (patch) | |
tree | c5d0bb12cc16af83f3b0e189dc0a48409a218522 /cpp/src/qpid/sys/Dispatcher.cpp | |
parent | 9d7759e7acb7f14f3e291f721f7235c7769a2499 (diff) | |
download | qpid-python-3d05570dc824c704285bfef1ff810fbb1589f596.tar.gz |
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
Diffstat (limited to 'cpp/src/qpid/sys/Dispatcher.cpp')
-rw-r--r-- | cpp/src/qpid/sys/Dispatcher.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
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 <boost/cast.hpp> + #include <assert.h> namespace qpid { @@ -36,7 +38,8 @@ Dispatcher::~Dispatcher() { void Dispatcher::run() { do { Poller::Event event = poller->wait(); - DispatchHandle* h = static_cast<DispatchHandle*>(event.handle); + DispatchHandle* h = + boost::polymorphic_downcast<DispatchHandle*>(event.handle); // If can read/write then dispatch appropriate callbacks if (h) { |