You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2010/06/22 20:13:35 UTC

svn commit: r956965 - in /qpid/trunk/qpid/cpp/src/qpid/sys: ClusterSafe.cpp ClusterSafe.h

Author: aconway
Date: Tue Jun 22 18:13:35 2010
New Revision: 956965

URL: http://svn.apache.org/viewvc?rev=956965&view=rev
Log:
Fix bad assertion introduced in prevoius commit r956882

Modified:
    qpid/trunk/qpid/cpp/src/qpid/sys/ClusterSafe.cpp
    qpid/trunk/qpid/cpp/src/qpid/sys/ClusterSafe.h

Modified: qpid/trunk/qpid/cpp/src/qpid/sys/ClusterSafe.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/sys/ClusterSafe.cpp?rev=956965&r1=956964&r2=956965&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/sys/ClusterSafe.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/sys/ClusterSafe.cpp Tue Jun 22 18:13:35 2010
@@ -43,14 +43,14 @@ void assertClusterSafe()  {
     }
 }
 
-ClusterSafeScope::ClusterSafeScope() {
-    assert(!inContext);
+ClusterSafeScope::ClusterSafeScope()  {
+    save = inContext;
     inContext = true;
 }
 
 ClusterSafeScope::~ClusterSafeScope() {
     assert(inContext);
-    inContext = false;
+    inContext = save;
 }
 
 void enableClusterSafe() { inCluster = true; }

Modified: qpid/trunk/qpid/cpp/src/qpid/sys/ClusterSafe.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/sys/ClusterSafe.h?rev=956965&r1=956964&r2=956965&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/sys/ClusterSafe.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/sys/ClusterSafe.h Tue Jun 22 18:13:35 2010
@@ -61,9 +61,12 @@ QPID_COMMON_EXTERN bool isCluster();
  * and provides functions to assist detecting bugs in cluster
  * behavior.
  */
-struct ClusterSafeScope {
+class ClusterSafeScope {
+  public:
     ClusterSafeScope();
     ~ClusterSafeScope();
+  private:
+    bool save;
 };
 
 /**



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