diff options
author | Alan Conway <aconway@apache.org> | 2009-02-04 20:01:52 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2009-02-04 20:01:52 +0000 |
commit | f847d041bc6bf18246bddeff2a219dcbdfa9620c (patch) | |
tree | 505eadb9501d74e81ec7ae92b146458b8e0a36b9 /cpp/src | |
parent | 35d0d4f0173659f406785f23113c607c09d6041c (diff) | |
download | qpid-python-f847d041bc6bf18246bddeff2a219dcbdfa9620c.tar.gz |
Fix memory error in ClusterPlugin.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@740849 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/qpid/cluster/ClusterPlugin.cpp | 6 | ||||
-rw-r--r-- | cpp/src/qpid/cluster/Cpg.cpp | 9 |
2 files changed, 8 insertions, 7 deletions
diff --git a/cpp/src/qpid/cluster/ClusterPlugin.cpp b/cpp/src/qpid/cluster/ClusterPlugin.cpp index 7e0bdcbea8..2f7d12dcfe 100644 --- a/cpp/src/qpid/cluster/ClusterPlugin.cpp +++ b/cpp/src/qpid/cluster/ClusterPlugin.cpp @@ -158,8 +158,10 @@ struct ClusterPlugin : public Plugin { } } - void initialize(Plugin::Target& ) { - cluster->initialize(); + void initialize(Plugin::Target& target) { + Broker* broker = dynamic_cast<Broker*>(&target); + if (broker && cluster) + cluster->initialize(); } }; diff --git a/cpp/src/qpid/cluster/Cpg.cpp b/cpp/src/qpid/cluster/Cpg.cpp index cc12328d97..453e3870f4 100644 --- a/cpp/src/qpid/cluster/Cpg.cpp +++ b/cpp/src/qpid/cluster/Cpg.cpp @@ -144,8 +144,9 @@ string Cpg::errorStr(cpg_error_t err, const std::string& msg) { 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 @@ string Cpg::errorStr(cpg_error_t err, const std::string& msg) { 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 << ")"; |