summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-12-27 14:10:29 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-12-27 14:10:29 (GMT)
commitcd9c5b8d87aaae48a058ae8d498bc81d0fed82ad (patch)
tree653077dbad716ed03052facd45fcdfc5bb182b86 /Swiften
parentff700194d1d6e8e347a50912de9320f9c3d463bb (diff)
downloadswift-cd9c5b8d87aaae48a058ae8d498bc81d0fed82ad.zip
swift-cd9c5b8d87aaae48a058ae8d498bc81d0fed82ad.tar.bz2
Avoid more valgrind warnings.
Diffstat (limited to 'Swiften')
-rw-r--r--Swiften/Client/CoreClient.cpp26
-rw-r--r--Swiften/Client/CoreClient.h3
-rw-r--r--Swiften/TLS/OpenSSL/OpenSSLContext.cpp3
3 files changed, 25 insertions, 7 deletions
diff --git a/Swiften/Client/CoreClient.cpp b/Swiften/Client/CoreClient.cpp
index b2bbad8..7b1f3fd 100644
--- a/Swiften/Client/CoreClient.cpp
+++ b/Swiften/Client/CoreClient.cpp
@@ -24,9 +24,9 @@ namespace Swift {
CoreClient::CoreClient(EventLoop* eventLoop, NetworkFactories* networkFactories, const JID& jid, const String& password) : jid_(jid), password_(password), eventLoop(eventLoop), networkFactories(networkFactories), disconnectRequested_(false), certificateTrustChecker(NULL) {
stanzaChannel_ = new ClientSessionStanzaChannel();
- stanzaChannel_->onMessageReceived.connect(boost::ref(onMessageReceived));
- stanzaChannel_->onPresenceReceived.connect(boost::ref(onPresenceReceived));
- stanzaChannel_->onStanzaAcked.connect(boost::ref(onStanzaAcked));
+ stanzaChannel_->onMessageReceived.connect(boost::bind(&CoreClient::handleMessageReceived, this, _1));
+ stanzaChannel_->onPresenceReceived.connect(boost::bind(&CoreClient::handlePresenceReceived, this, _1));
+ stanzaChannel_->onStanzaAcked.connect(boost::bind(&CoreClient::handleStanzaAcked, this, _1));
stanzaChannel_->onAvailableChanged.connect(boost::bind(&CoreClient::handleStanzaChannelAvailableChanged, this, _1));
iqRouter_ = new IQRouter(stanzaChannel_);
@@ -41,9 +41,9 @@ CoreClient::~CoreClient() {
delete iqRouter_;
stanzaChannel_->onAvailableChanged.disconnect(boost::bind(&CoreClient::handleStanzaChannelAvailableChanged, this, _1));
- stanzaChannel_->onMessageReceived.disconnect(boost::ref(onMessageReceived));
- stanzaChannel_->onPresenceReceived.disconnect(boost::ref(onPresenceReceived));
- stanzaChannel_->onStanzaAcked.disconnect(boost::ref(onStanzaAcked));
+ stanzaChannel_->onMessageReceived.disconnect(boost::bind(&CoreClient::handleMessageReceived, this, _1));
+ stanzaChannel_->onPresenceReceived.disconnect(boost::bind(&CoreClient::handlePresenceReceived, this, _1));
+ stanzaChannel_->onStanzaAcked.disconnect(boost::bind(&CoreClient::handleStanzaAcked, this, _1));
delete stanzaChannel_;
}
@@ -251,4 +251,18 @@ void CoreClient::setCertificateTrustChecker(CertificateTrustChecker* checker) {
certificateTrustChecker = checker;
}
+
+void CoreClient::handlePresenceReceived(Presence::ref presence) {
+ onPresenceReceived(presence);
+}
+
+void CoreClient::handleMessageReceived(Message::ref message) {
+ onMessageReceived(message);
+}
+
+void CoreClient::handleStanzaAcked(Stanza::ref stanza) {
+ onStanzaAcked(stanza);
+}
+
+
}
diff --git a/Swiften/Client/CoreClient.h b/Swiften/Client/CoreClient.h
index 925a357..bac78a3 100644
--- a/Swiften/Client/CoreClient.h
+++ b/Swiften/Client/CoreClient.h
@@ -200,6 +200,9 @@ namespace Swift {
void handleNeedCredentials();
void handleDataRead(const String&);
void handleDataWritten(const String&);
+ void handlePresenceReceived(Presence::ref);
+ void handleMessageReceived(Message::ref);
+ void handleStanzaAcked(Stanza::ref);
private:
JID jid_;
diff --git a/Swiften/TLS/OpenSSL/OpenSSLContext.cpp b/Swiften/TLS/OpenSSL/OpenSSLContext.cpp
index e922f2d..be2f0af 100644
--- a/Swiften/TLS/OpenSSL/OpenSSLContext.cpp
+++ b/Swiften/TLS/OpenSSL/OpenSSLContext.cpp
@@ -70,7 +70,8 @@ void OpenSSLContext::ensureLibraryInitialized() {
OpenSSL_add_all_algorithms();
// Disable compression
- /*STACK_OF(SSL_COMP)* compressionMethods = SSL_COMP_get_compression_methods();
+ /*
+ STACK_OF(SSL_COMP)* compressionMethods = SSL_COMP_get_compression_methods();
sk_SSL_COMP_zero(compressionMethods);*/
isLibraryInitialized = true;