summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2014-03-08 08:28:20 (GMT)
committerSwift Review <review@swift.im>2014-03-21 09:57:37 (GMT)
commit7c2639d131a62496a5d0ba894e63a314ed2012d6 (patch)
tree58f5809e3f8950c343800b9e11e88194a963f892 /Swiften/Client/ClientXMLTracer.cpp
parenta51044193098128f615287308240edd0611a2e4b (diff)
downloadswift-7c2639d131a62496a5d0ba894e63a314ed2012d6.zip
swift-7c2639d131a62496a5d0ba894e63a314ed2012d6.tar.bz2
Disconnect ClientXMLTracer signals at destruction time
This fixes a crash when disabling the XML tracer. Change-Id: Id26255610e71809901409e42d5a61b18e502d8f6
Diffstat (limited to 'Swiften/Client/ClientXMLTracer.cpp')
-rw-r--r--Swiften/Client/ClientXMLTracer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Swiften/Client/ClientXMLTracer.cpp b/Swiften/Client/ClientXMLTracer.cpp
index b413f40..9bfa047 100644
--- a/Swiften/Client/ClientXMLTracer.cpp
+++ b/Swiften/Client/ClientXMLTracer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -19,8 +19,8 @@ ClientXMLTracer::ClientXMLTracer(CoreClient* client, bool bosh) : bosh(bosh) {
#else
beautifier = new XMLBeautifier(true, true);
#endif
- client->onDataRead.connect(boost::bind(&ClientXMLTracer::printData, this, '<', _1));
- client->onDataWritten.connect(boost::bind(&ClientXMLTracer::printData, this, '>', _1));
+ onDataReadConnection = client->onDataRead.connect(boost::bind(&ClientXMLTracer::printData, this, '<', _1));
+ onDataWrittenConnection = client->onDataWritten.connect(boost::bind(&ClientXMLTracer::printData, this, '>', _1));
}
ClientXMLTracer::~ClientXMLTracer() {