summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/SessionState.cpp
diff options
context:
space:
mode:
authorKenneth Anthony Giusti <kgiusti@apache.org>2011-08-04 18:45:16 +0000
committerKenneth Anthony Giusti <kgiusti@apache.org>2011-08-04 18:45:16 +0000
commitbbf3934497e7c95f2b90b59dbef7c5adc810ce7b (patch)
tree53895f73f7414c5327e89c685d87a253bd6acdb0 /cpp/src/qpid/broker/SessionState.cpp
parent1970e97d49f8c0fdc61584afbad976613d34f262 (diff)
downloadqpid-python-bbf3934497e7c95f2b90b59dbef7c5adc810ce7b.tar.gz
QPID-3394: move object copy after changing object state, not before.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1153966 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/SessionState.cpp')
-rw-r--r--cpp/src/qpid/broker/SessionState.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/cpp/src/qpid/broker/SessionState.cpp b/cpp/src/qpid/broker/SessionState.cpp
index ee9646931e..742dbe9be8 100644
--- a/cpp/src/qpid/broker/SessionState.cpp
+++ b/cpp/src/qpid/broker/SessionState.cpp
@@ -445,8 +445,6 @@ void SessionState::addPendingExecutionSync()
boost::intrusive_ptr<AsyncCompletion::Callback>
SessionState::IncompleteIngressMsgXfer::clone()
{
- boost::intrusive_ptr<SessionState::IncompleteIngressMsgXfer> cb(new SessionState::IncompleteIngressMsgXfer(session, msg));
-
// Optimization: this routine is *only* invoked when the message needs to be asynchronously completed.
// If the client is pending the message.transfer completion, flush now to force immediate write to journal.
if (requiresSync)
@@ -457,7 +455,8 @@ SessionState::IncompleteIngressMsgXfer::clone()
pending = true;
completerContext->addPendingMessage(msg);
}
- return cb;
+
+ return boost::intrusive_ptr<SessionState::IncompleteIngressMsgXfer>(new SessionState::IncompleteIngressMsgXfer(*this));
}