qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject svn commit: r1677197 - /qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp
Date Fri, 01 May 2015 18:00:05 GMT
Author: gsim
Date: Fri May  1 18:00:04 2015
New Revision: 1677197

URL: http://svn.apache.org/r1677197
Log:
QPID-6526: fix to last commit, lock needs to be held for attach

Modified:
    qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp?rev=1677197&r1=1677196&r2=1677197&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp Fri May  1 18:00:04
2015
@@ -1252,7 +1252,10 @@ void ConnectionContext::startTxSession(b
         QPID_LOG(debug, id << " attaching transaction for " << session->getName());
         boost::shared_ptr<Transaction> tx(new Transaction(session->session));
         session->transaction = tx;
-        attach(session, boost::shared_ptr<SenderContext>(tx));
+        {
+            sys::Monitor::ScopedLock l(lock);
+            attach(session, boost::shared_ptr<SenderContext>(tx));
+        }
         tx->declare(boost::bind(&ConnectionContext::send, this, _1, _2, _3, _4, _5),
session);
     } catch (const Exception& e) {
         throw TransactionError(Msg() << "Cannot start transaction: " << e.what());



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message