qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r740849 - in /qpid/trunk/qpid/cpp/src/qpid/cluster: ClusterPlugin.cpp Cpg.cpp
Date Wed, 04 Feb 2009 20:01:52 GMT
Author: aconway
Date: Wed Feb  4 20:01:52 2009
New Revision: 740849

URL: http://svn.apache.org/viewvc?rev=740849&view=rev
Log:
Fix memory error in ClusterPlugin.

Modified:
    qpid/trunk/qpid/cpp/src/qpid/cluster/ClusterPlugin.cpp
    qpid/trunk/qpid/cpp/src/qpid/cluster/Cpg.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/cluster/ClusterPlugin.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/cluster/ClusterPlugin.cpp?rev=740849&r1=740848&r2=740849&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/cluster/ClusterPlugin.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/cluster/ClusterPlugin.cpp Wed Feb  4 20:01:52 2009
@@ -158,8 +158,10 @@
         }
     }
 
-    void initialize(Plugin::Target& ) {
-        cluster->initialize();
+    void initialize(Plugin::Target& target) {
+        Broker* broker = dynamic_cast<Broker*>(&target);
+        if (broker && cluster)
+            cluster->initialize();
     }
 };
 

Modified: qpid/trunk/qpid/cpp/src/qpid/cluster/Cpg.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/cluster/Cpg.cpp?rev=740849&r1=740848&r2=740849&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/cluster/Cpg.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/cluster/Cpg.cpp Wed Feb  4 20:01:52 2009
@@ -144,8 +144,9 @@
     os << msg << ": ";
     switch (err) {
       case CPG_OK: os << "ok"; break;
+      case CPG_ERR_LIBRARY: os << "library"; break;
       case CPG_ERR_TIMEOUT: os << "timeout"; break;
-      case CPG_ERR_TRY_AGAIN: os << "timeout. The aisexec daemon may not be running";
break;
+      case CPG_ERR_TRY_AGAIN: os << "try again"; break;
       case CPG_ERR_INVALID_PARAM: os << "invalid param"; break;
       case CPG_ERR_NO_MEMORY: os << "no memory"; break;
       case CPG_ERR_BAD_HANDLE: os << "bad handle"; break;
@@ -153,10 +154,8 @@
       case CPG_ERR_NOT_EXIST: os << "not exist"; break;
       case CPG_ERR_EXIST: os << "exist"; break;
       case CPG_ERR_NOT_SUPPORTED: os << "not supported"; break;
-        // The following are not mapped, or are incorrectly mapped in corosync 0-92-5
-        // case CPG_ERR_LIBRARY: os << "library"; break;
-        // case CPG_ERR_SECURITY: os << "security"; break;
-        // case CPG_ERR_TOO_MANY_GROUPS: os << "too many groups"; break;
+      case CPG_ERR_SECURITY: os << "security"; break;
+      case CPG_ERR_TOO_MANY_GROUPS: os << "too many groups"; break;
       default: os << ": unknown cpg error " << err;
     };
     os << " (" << err << ")";



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


Mime
View raw message