diff options
| author | Gordon Sim <gsim@apache.org> | 2007-11-12 17:52:31 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2007-11-12 17:52:31 +0000 |
| commit | 82362e02efb289ef0c964b7034ccaa10ca4923a6 (patch) | |
| tree | b8fd1e5f94ed55e6fc0004e301827a618a3ab775 /cpp/src/qpid/broker/SessionState.cpp | |
| parent | dbbfec3dc9e886ae4b505537921faf9d6540acf3 (diff) | |
| download | qpid-python-82362e02efb289ef0c964b7034ccaa10ca4923a6.tar.gz | |
Change to avoid assertion when delivery is concurrent with session detachment:
* in SessionState::getHandler() doesn't assert and just return pointer
* do assertion internally in SessionState where getHandler was relied
for this before
* in SemanticHandler::deliver() get handler and check it; if null then
dump the message and print an error
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@594233 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/SessionState.cpp')
| -rw-r--r-- | cpp/src/qpid/broker/SessionState.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/cpp/src/qpid/broker/SessionState.cpp b/cpp/src/qpid/broker/SessionState.cpp index 45d78c9307..d5b6f5ba8a 100644 --- a/cpp/src/qpid/broker/SessionState.cpp +++ b/cpp/src/qpid/broker/SessionState.cpp @@ -55,17 +55,18 @@ SessionState::~SessionState() { factory.erase(getId()); } -SessionHandler& SessionState::getHandler() { - assert(isAttached()); - return *handler; +SessionHandler* SessionState::getHandler() { + return handler; } AMQP_ClientProxy& SessionState::getProxy() { - return getHandler().getProxy(); + assert(isAttached()); + return getHandler()->getProxy(); } Connection& SessionState::getConnection() { - return getHandler().getConnection(); + assert(isAttached()); + return getHandler()->getConnection(); } void SessionState::detach() { |
