summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/StreamStack')
-rw-r--r--Swiften/StreamStack/ConnectionLayer.cpp5
-rw-r--r--Swiften/StreamStack/ConnectionLayer.h4
-rw-r--r--Swiften/StreamStack/TLSLayer.h7
3 files changed, 8 insertions, 8 deletions
diff --git a/Swiften/StreamStack/ConnectionLayer.cpp b/Swiften/StreamStack/ConnectionLayer.cpp
index 4546a9b..5bf07d0 100644
--- a/Swiften/StreamStack/ConnectionLayer.cpp
+++ b/Swiften/StreamStack/ConnectionLayer.cpp
@@ -1,23 +1,24 @@
/*
- * Copyright (c) 2010 Isode Limited.
+ * Copyright (c) 2010-2015 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#include <Swiften/StreamStack/ConnectionLayer.h>
+
#include <boost/bind.hpp>
namespace Swift {
ConnectionLayer::ConnectionLayer(boost::shared_ptr<Connection> connection) : connection(connection) {
connection->onDataRead.connect(boost::bind(&ConnectionLayer::handleDataRead, this, _1));
}
ConnectionLayer::~ConnectionLayer() {
- connection->onDataRead.disconnect(boost::bind(&ConnectionLayer::writeDataToParentLayer, this, _1));
+ connection->onDataRead.disconnect(boost::bind(&ConnectionLayer::handleDataRead, this, _1));
}
void ConnectionLayer::handleDataRead(boost::shared_ptr<SafeByteArray> data) {
writeDataToParentLayer(*data);
}
diff --git a/Swiften/StreamStack/ConnectionLayer.h b/Swiften/StreamStack/ConnectionLayer.h
index 2ff1c3c..e89e24c 100644
--- a/Swiften/StreamStack/ConnectionLayer.h
+++ b/Swiften/StreamStack/ConnectionLayer.h
@@ -6,20 +6,20 @@
#pragma once
#include <boost/shared_ptr.hpp>
#include <Swiften/Base/API.h>
-#include <Swiften/StreamStack/LowLayer.h>
#include <Swiften/Network/Connection.h>
+#include <Swiften/StreamStack/LowLayer.h>
namespace Swift {
class SWIFTEN_API ConnectionLayer : public LowLayer {
public:
ConnectionLayer(boost::shared_ptr<Connection> connection);
- ~ConnectionLayer();
+ virtual ~ConnectionLayer();
void writeData(const SafeByteArray& data) {
connection->write(data);
}
private:
diff --git a/Swiften/StreamStack/TLSLayer.h b/Swiften/StreamStack/TLSLayer.h
index 87d69a9..0ab35d5 100644
--- a/Swiften/StreamStack/TLSLayer.h
+++ b/Swiften/StreamStack/TLSLayer.h
@@ -3,31 +3,30 @@
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/boost_bsignals.h>
-
#include <Swiften/Base/API.h>
#include <Swiften/Base/SafeByteArray.h>
+#include <Swiften/Base/boost_bsignals.h>
#include <Swiften/StreamStack/StreamLayer.h>
#include <Swiften/TLS/Certificate.h>
-#include <Swiften/TLS/CertificateWithKey.h>
#include <Swiften/TLS/CertificateVerificationError.h>
+#include <Swiften/TLS/CertificateWithKey.h>
#include <Swiften/TLS/TLSError.h>
#include <Swiften/TLS/TLSOptions.h>
namespace Swift {
class TLSContext;
class TLSContextFactory;
class SWIFTEN_API TLSLayer : public StreamLayer {
public:
TLSLayer(TLSContextFactory*, const TLSOptions&);
- ~TLSLayer();
+ virtual ~TLSLayer();
void connect();
bool setClientCertificate(CertificateWithKey::ref cert);
Certificate::ref getPeerCertificate() const;
std::vector<Certificate::ref> getPeerCertificateChain() const;