summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2015-11-18 14:08:45 (GMT)
committerTobias Markmann <tm@ayena.de>2015-11-18 14:08:45 (GMT)
commitcda6fd478b3d8f7f30f771b18324db389a01b1b3 (patch)
tree2d71e6787a0e937701968b5ce440f01c74c911ca /Swiften/StreamStack
parenteb2cdc07f275d565b76940396381784e29125981 (diff)
downloadswift-cda6fd478b3d8f7f30f771b18324db389a01b1b3.zip
swift-cda6fd478b3d8f7f30f771b18324db389a01b1b3.tar.bz2
Fix virtual destructors and mismatching signal disconnection
Test-Information: Unit tests pass on OS X 10.10.5. Change-Id: I7b505513b4342001596ee8518bfdcf9e77c91479
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,10 +1,11 @@
/*
- * 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 {
@@ -14,7 +15,7 @@ ConnectionLayer::ConnectionLayer(boost::shared_ptr<Connection> connection) : con
}
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) {
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
@@ -9,14 +9,14 @@
#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);
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
@@ -6,14 +6,13 @@
#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>
@@ -24,7 +23,7 @@ namespace Swift {
class SWIFTEN_API TLSLayer : public StreamLayer {
public:
TLSLayer(TLSContextFactory*, const TLSOptions&);
- ~TLSLayer();
+ virtual ~TLSLayer();
void connect();
bool setClientCertificate(CertificateWithKey::ref cert);