diff options
author | Remko Tronçon <git@el-tramo.be> | 2009-07-19 16:12:36 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2009-07-19 16:12:36 (GMT) |
commit | 2fe12d374a18bf4c96f98d3e02c484e8307c1fe0 (patch) | |
tree | d0b4f55b34865b1962995742888536da76e84d2e /Nim/main.cpp | |
parent | bfa7d3d26faaa2db2580d6d7a9388beb71a53c7b (diff) | |
download | swift-2fe12d374a18bf4c96f98d3e02c484e8307c1fe0.zip swift-2fe12d374a18bf4c96f98d3e02c484e8307c1fe0.tar.bz2 |
Fix bug with outgoing link-local connections.
Diffstat (limited to 'Nim/main.cpp')
-rw-r--r-- | Nim/main.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Nim/main.cpp b/Nim/main.cpp index 2522a13..a9e9934 100644 --- a/Nim/main.cpp +++ b/Nim/main.cpp @@ -200,7 +200,7 @@ class Server { boost::shared_ptr<LinkLocalConnector> connector = getLinkLocalConnectorForJID(toJID); if (!connector) { - boost::shared_ptr<LinkLocalConnector> connector( + connector = boost::shared_ptr<LinkLocalConnector>( new LinkLocalConnector( toJID, linkLocalRoster_->getHostname(toJID), @@ -210,6 +210,7 @@ class Server { connector->onConnectFinished.connect( boost::bind(&Server::handleConnectFinished, this, connector, _1)); connectors_.push_back(connector); + connector->connect(); } connector->queueElement(element); } @@ -232,10 +233,10 @@ class Server { new OutgoingLinkLocalSession( selfJID_, connector->getRemoteJID(), connector->getConnection(), &payloadParserFactories_, &payloadSerializers_)); - registerLinkLocalSession(outgoingSession); foreach(const boost::shared_ptr<Element> element, connector->getQueuedElements()) { outgoingSession->queueElement(element); } + registerLinkLocalSession(outgoingSession); } connectors_.erase(std::remove(connectors_.begin(), connectors_.end(), connector), connectors_.end()); } |