summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/sys/ClusterSafe.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid/sys/ClusterSafe.cpp')
-rw-r--r--cpp/src/qpid/sys/ClusterSafe.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/cpp/src/qpid/sys/ClusterSafe.cpp b/cpp/src/qpid/sys/ClusterSafe.cpp
index 498a46d865..e051591afd 100644
--- a/cpp/src/qpid/sys/ClusterSafe.cpp
+++ b/cpp/src/qpid/sys/ClusterSafe.cpp
@@ -32,8 +32,12 @@ bool inCluster = false;
QPID_TSS bool inContext = false;
}
+bool isClusterSafe() { return !inCluster || inContext; }
+
+bool isCluster() { return inCluster; }
+
void assertClusterSafe() {
- if (inCluster && !inContext) {
+ if (!isClusterSafe()) {
QPID_LOG(critical, "Modified cluster state outside of cluster context");
::abort();
}