diff options
| author | Alan Conway <aconway@apache.org> | 2010-05-11 14:39:58 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2010-05-11 14:39:58 +0000 |
| commit | 16da0e0c511c0c1cf4ea592640c522754065200a (patch) | |
| tree | 59fb80994db731fabe19897c95a6912e68716360 /cpp/src/qpid/client/FailoverManager.cpp | |
| parent | be8e1bf6b6a0d760bddbbe6642d477a95f36ab42 (diff) | |
| download | qpid-python-16da0e0c511c0c1cf4ea592640c522754065200a.tar.gz | |
Support for multiple protocols in qpid::Url.
- simplified qpid::Address to hold (protocol,host,port) triples.
- protocol plugins call Url:addProtocol to add tags to Url parser.
- use Address::protocol when establishing connections.
- ssl_test: tests using URL to connect.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@943130 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/FailoverManager.cpp')
| -rw-r--r-- | cpp/src/qpid/client/FailoverManager.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/cpp/src/qpid/client/FailoverManager.cpp b/cpp/src/qpid/client/FailoverManager.cpp index 81f71eb7df..9405765b47 100644 --- a/cpp/src/qpid/client/FailoverManager.cpp +++ b/cpp/src/qpid/client/FailoverManager.cpp @@ -104,12 +104,11 @@ void FailoverManager::attempt(Connection& c, ConnectionSettings s, std::vector<U } else { for (std::vector<Url>::const_iterator i = urls.begin(); i != urls.end() && !c.isOpen(); ++i) { for (Url::const_iterator j = i->begin(); j != i->end() && !c.isOpen(); ++j) { - const TcpAddress* tcp = j->get<TcpAddress>(); - if (tcp) { - s.host = tcp->host; - s.port = tcp->port; - attempt(c, s); - } + const Address& addr = *j; + s.protocol = addr.protocol; + s.host = addr.host; + s.port = addr.port; + attempt(c, s); } } } |
