From 1951f9cf0c246b53d1cddf65dfdb059ad8662377 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Wed, 9 Jun 2010 20:29:32 +0000 Subject: Fix cluster-safe assertion in connection negotiation. See https://bugzilla.redhat.com/show_bug.cgi?id=602347. In a cluster, raise the management connect event when processing cluster.announce. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@953147 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/sys/ClusterSafe.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'cpp/src/qpid/sys/ClusterSafe.cpp') 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(); } -- cgit v1.2.1