diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-10-10 13:31:39 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-10-10 13:31:39 (GMT) |
commit | 29e4e51e21b8902c82456cc85af46fa5f5889f04 (patch) | |
tree | 5ad1d62b82effb59d46d92a272b3ebe998ce6e08 /Swiften/Roster | |
parent | fb7fe3dd7cf48b0e4a7337212129520dff5a236d (diff) | |
download | swift-contrib-29e4e51e21b8902c82456cc85af46fa5f5889f04.zip swift-contrib-29e4e51e21b8902c82456cc85af46fa5f5889f04.tar.bz2 |
Refactor responders to only start on start().
Diffstat (limited to 'Swiften/Roster')
-rw-r--r-- | Swiften/Roster/XMPPRosterController.cpp | 5 | ||||
-rw-r--r-- | Swiften/Roster/XMPPRosterController.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/Swiften/Roster/XMPPRosterController.cpp b/Swiften/Roster/XMPPRosterController.cpp index 7743ec8..feaa7d4 100644 --- a/Swiften/Roster/XMPPRosterController.cpp +++ b/Swiften/Roster/XMPPRosterController.cpp @@ -25,6 +25,11 @@ namespace Swift { */ XMPPRosterController::XMPPRosterController(IQRouter* iqRouter, XMPPRoster* xmppRoster) : iqRouter_(iqRouter), rosterPushResponder_(iqRouter), xmppRoster_(xmppRoster) { rosterPushResponder_.onRosterReceived.connect(boost::bind(&XMPPRosterController::handleRosterReceived, this, _1)); + rosterPushResponder_.start(); +} + +XMPPRosterController::~XMPPRosterController() { + rosterPushResponder_.stop(); } void XMPPRosterController::requestRoster() { diff --git a/Swiften/Roster/XMPPRosterController.h b/Swiften/Roster/XMPPRosterController.h index 3ef7795..22a63ad 100644 --- a/Swiften/Roster/XMPPRosterController.h +++ b/Swiften/Roster/XMPPRosterController.h @@ -22,6 +22,7 @@ namespace Swift { class XMPPRosterController { public: XMPPRosterController(IQRouter *iqRouter, XMPPRoster* xmppRoster); + ~XMPPRosterController(); void requestRoster(); |