diff options
author | Alan Conway <aconway@apache.org> | 2010-06-22 18:13:35 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2010-06-22 18:13:35 +0000 |
commit | 9f875847254c6a47f7fc9fef3fcfee7e0391d39e (patch) | |
tree | 5377a0fdfc56bfe1278439b4deab6774de1c16c3 /qpid/cpp | |
parent | 1a85afb37de55697e172acd001db98dd9b4722a1 (diff) | |
download | qpid-python-9f875847254c6a47f7fc9fef3fcfee7e0391d39e.tar.gz |
Fix bad assertion introduced in prevoius commit r956882
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@956965 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp')
-rw-r--r-- | qpid/cpp/src/qpid/sys/ClusterSafe.cpp | 6 | ||||
-rw-r--r-- | qpid/cpp/src/qpid/sys/ClusterSafe.h | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/qpid/cpp/src/qpid/sys/ClusterSafe.cpp b/qpid/cpp/src/qpid/sys/ClusterSafe.cpp index 6105fc96c7..c6b527dfdf 100644 --- a/qpid/cpp/src/qpid/sys/ClusterSafe.cpp +++ b/qpid/cpp/src/qpid/sys/ClusterSafe.cpp @@ -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; } diff --git a/qpid/cpp/src/qpid/sys/ClusterSafe.h b/qpid/cpp/src/qpid/sys/ClusterSafe.h index f3382307d0..15675e8cc5 100644 --- a/qpid/cpp/src/qpid/sys/ClusterSafe.h +++ b/qpid/cpp/src/qpid/sys/ClusterSafe.h @@ -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; }; /** |