diff options
author | Alan Conway <aconway@apache.org> | 2008-02-01 16:03:02 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2008-02-01 16:03:02 +0000 |
commit | df599b1716535909317e61f4b43516d48373ad1c (patch) | |
tree | 7971d8abe970f9711cf5ba7d817cf57fc0b85a87 /cpp/src/qpid/cluster/Cluster.cpp | |
parent | e5450586ffe0d33c92eed1b4c961e9b150f4663c (diff) | |
download | qpid-python-df599b1716535909317e61f4b43516d48373ad1c.tar.gz |
Added cluster URL configuration, defaults to all interfaces.
src/qpid/Plugin.h - added doxygen
src/qpid/Url.cpp,.h - cache string rep, op==, istream/ostream ops.
src/qpid/broker/Broker.h,.cpp - removed getUrl()
src/qpid/cluster/Cluster.h,.cpp - use Url class
src/qpid/cluster/ClusterPlugin.cpp - added --url configuration.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@617533 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/Cluster.cpp')
-rw-r--r-- | cpp/src/qpid/cluster/Cluster.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cpp/src/qpid/cluster/Cluster.cpp b/cpp/src/qpid/cluster/Cluster.cpp index ce87d23c0d..49270bcfef 100644 --- a/cpp/src/qpid/cluster/Cluster.cpp +++ b/cpp/src/qpid/cluster/Cluster.cpp @@ -47,7 +47,7 @@ ostream& operator <<(ostream& out, const Cluster::MemberMap& members) { return out; } -Cluster::Cluster(const std::string& name_, const std::string& url_, broker::Broker&) : +Cluster::Cluster(const std::string& name_, const Url& url_, broker::Broker&) : FrameHandler(0), // FIXME aconway 2008-01-29: handler. + observer cpg(*this), name(name_), @@ -87,7 +87,7 @@ void Cluster::handle(AMQFrame& frame) { } void Cluster::notify() { - AMQFrame frame(in_place<ClusterNotifyBody>(ProtocolVersion(), url)); + AMQFrame frame(in_place<ClusterNotifyBody>(ProtocolVersion(), url.str())); handle(frame); } @@ -143,7 +143,7 @@ void Cluster::handleClusterFrame(Id from, AMQFrame& frame) { { Mutex::ScopedLock l(lock); members[from].url=notifyIn->getUrl(); - if (!self.id && notifyIn->getUrl() == url) + if (!self.id && notifyIn->getUrl() == url.str()) self=from; lock.notifyAll(); QPID_LOG(trace, *this << ": members joined: " << members); |