qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject svn commit: r1145935 - /qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp
Date Wed, 13 Jul 2011 09:52:35 GMT
Author: gsim
Date: Wed Jul 13 09:52:35 2011
New Revision: 1145935

URL: http://svn.apache.org/viewvc?rev=1145935&view=rev
Log:
QPID-3355: Ensure session is not deleted out from under a sync() call

Modified:
    qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp?rev=1145935&r1=1145934&r2=1145935&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp Wed Jul 13 09:52:35 2011
@@ -432,8 +432,11 @@ uint32_t SessionImpl::getUnsettledAcksIm
 
 void SessionImpl::syncImpl(bool block)
 {
-    if (block) session.sync();
-    else session.flush();
+    {
+        ScopedLock l(lock);
+        if (block) session.sync();
+        else session.flush();
+    }
     //cleanup unconfirmed accept records:
     incoming.pendingAccept();
 }



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message