summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-07-19 16:12:36 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-07-19 16:12:36 (GMT)
commit2fe12d374a18bf4c96f98d3e02c484e8307c1fe0 (patch)
treed0b4f55b34865b1962995742888536da76e84d2e /Swiften
parentbfa7d3d26faaa2db2580d6d7a9388beb71a53c7b (diff)
downloadswift-2fe12d374a18bf4c96f98d3e02c484e8307c1fe0.zip
swift-2fe12d374a18bf4c96f98d3e02c484e8307c1fe0.tar.bz2
Fix bug with outgoing link-local connections.
Diffstat (limited to 'Swiften')
-rw-r--r--Swiften/LinkLocal/OutgoingLinkLocalSession.cpp7
-rw-r--r--Swiften/LinkLocal/OutgoingLinkLocalSession.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/Swiften/LinkLocal/OutgoingLinkLocalSession.cpp b/Swiften/LinkLocal/OutgoingLinkLocalSession.cpp
index 4118e34..1c2fefb 100644
--- a/Swiften/LinkLocal/OutgoingLinkLocalSession.cpp
+++ b/Swiften/LinkLocal/OutgoingLinkLocalSession.cpp
@@ -2,6 +2,7 @@
#include <boost/bind.hpp>
+#include "Swiften/StreamStack/XMPPLayer.h"
#include "Swiften/Elements/ProtocolHeader.h"
#include "Swiften/Elements/StreamFeatures.h"
#include "Swiften/Elements/IQ.h"
@@ -19,6 +20,12 @@ OutgoingLinkLocalSession::OutgoingLinkLocalSession(
setRemoteJID(remoteJID);
}
+void OutgoingLinkLocalSession::handleSessionStarted() {
+ ProtocolHeader header;
+ header.setFrom(getLocalJID());
+ getXMPPLayer()->writeHeader(header);
+}
+
void OutgoingLinkLocalSession::handleStreamStart(const ProtocolHeader&) {
foreach(const boost::shared_ptr<Element>& stanza, queuedElements_) {
sendElement(stanza);
diff --git a/Swiften/LinkLocal/OutgoingLinkLocalSession.h b/Swiften/LinkLocal/OutgoingLinkLocalSession.h
index 904a9d3..32f78e4 100644
--- a/Swiften/LinkLocal/OutgoingLinkLocalSession.h
+++ b/Swiften/LinkLocal/OutgoingLinkLocalSession.h
@@ -27,6 +27,7 @@ namespace Swift {
void queueElement(boost::shared_ptr<Element> element);
private:
+ void handleSessionStarted();
void handleElement(boost::shared_ptr<Element>);
void handleStreamStart(const ProtocolHeader&);