diff options
author | Remko Tronçon <git@el-tramo.be> | 2009-11-10 21:39:38 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2009-11-10 21:39:38 (GMT) |
commit | 80a67051508b7a2f59e0ded9d1dd4df490d44ec2 (patch) | |
tree | 1ff1415ad56f9d88c5ec6ee16160e775e8b5b238 /Swiften/Session | |
parent | 54781ce12f7654f8136e645d4ebc5934d90c6bea (diff) | |
download | swift-80a67051508b7a2f59e0ded9d1dd4df490d44ec2.zip swift-80a67051508b7a2f59e0ded9d1dd4df490d44ec2.tar.bz2 |
Fixed error handling.
Diffstat (limited to 'Swiften/Session')
-rw-r--r-- | Swiften/Session/BasicSessionStream.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Swiften/Session/BasicSessionStream.cpp b/Swiften/Session/BasicSessionStream.cpp index 8b14367..807470e 100644 --- a/Swiften/Session/BasicSessionStream.cpp +++ b/Swiften/Session/BasicSessionStream.cpp @@ -75,14 +75,14 @@ void BasicSessionStream::addTLSEncryption() { } void BasicSessionStream::setWhitespacePingEnabled(bool enabled) { - if (enabled && !whitespacePingLayer) { - whitespacePingLayer = boost::shared_ptr<WhitespacePingLayer>(new WhitespacePingLayer()); - streamStack->addLayer(whitespacePingLayer); - } if (enabled) { + if (!whitespacePingLayer) { + whitespacePingLayer = boost::shared_ptr<WhitespacePingLayer>(new WhitespacePingLayer()); + streamStack->addLayer(whitespacePingLayer); + } whitespacePingLayer->setActive(); } - else { + else if (whitespacePingLayer) { whitespacePingLayer->setInactive(); } } |