summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/MUC')
-rw-r--r--Swiften/MUC/MUC.cpp2
-rw-r--r--Swiften/MUC/MUC.h4
2 files changed, 4 insertions, 2 deletions
diff --git a/Swiften/MUC/MUC.cpp b/Swiften/MUC/MUC.cpp
index a6fbcbd..3c06c7a 100644
--- a/Swiften/MUC/MUC.cpp
+++ b/Swiften/MUC/MUC.cpp
@@ -13,7 +13,7 @@ namespace Swift {
typedef std::pair<String, MUCOccupant> StringMUCOccupantPair;
MUC::MUC(StanzaChannel* stanzaChannel, PresenceSender* presenceSender, const JID &muc) : ownMUCJID(muc), stanzaChannel(stanzaChannel), presenceSender(presenceSender) {
- stanzaChannel->onPresenceReceived.connect(boost::bind(&MUC::handleIncomingPresence, this, _1));
+ scopedConnection_ = stanzaChannel->onPresenceReceived.connect(boost::bind(&MUC::handleIncomingPresence, this, _1));
}
void MUC::joinAs(const String &nick) {
diff --git a/Swiften/MUC/MUC.h b/Swiften/MUC/MUC.h
index c31f9ac..1ef974f 100644
--- a/Swiften/MUC/MUC.h
+++ b/Swiften/MUC/MUC.h
@@ -6,8 +6,9 @@
#include "Swiften/Elements/Presence.h"
#include "Swiften/MUC/MUCOccupant.h"
-#include <boost/signals.hpp>
#include <boost/shared_ptr.hpp>
+#include <boost/signals.hpp>
+#include <boost/signals/connection.hpp>
#include <map>
@@ -53,5 +54,6 @@ namespace Swift {
PresenceSender* presenceSender;
std::map<String, MUCOccupant> occupants;
bool firstPresenceSeen;
+ boost::bsignals::scoped_connection scopedConnection_;
};
}