summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-06-12 07:46:07 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-06-12 07:50:13 (GMT)
commit3260f09c55a6f06d9c3ac10f2eddbda68d94de4d (patch)
tree3f502e41a813d54d5a8efd2ca41f469dfefe16c5 /Swift
parente9a402583b02866c87475711c57b04f499e846ef (diff)
downloadswift-3260f09c55a6f06d9c3ac10f2eddbda68d94de4d.zip
swift-3260f09c55a6f06d9c3ac10f2eddbda68d94de4d.tar.bz2
Do not register IQHandler in the constructor.
This can get us in all kinds of trouble, including that it makes it impossible to use shared_ptr<> for Requests.
Diffstat (limited to 'Swift')
-rw-r--r--Swift/Controllers/XMPPRosterController.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Swift/Controllers/XMPPRosterController.cpp b/Swift/Controllers/XMPPRosterController.cpp
index 6bbc964..8385f65 100644
--- a/Swift/Controllers/XMPPRosterController.cpp
+++ b/Swift/Controllers/XMPPRosterController.cpp
@@ -22,11 +22,12 @@ namespace Swift {
* The controller does not gain ownership of these parameters.
*/
XMPPRosterController::XMPPRosterController(IQRouter* iqRouter, boost::shared_ptr<XMPPRoster> xmppRoster)
- : IQHandler(iqRouter), iqRouter_(iqRouter), xmppRoster_(xmppRoster) {
+ : iqRouter_(iqRouter), xmppRoster_(xmppRoster) {
+ iqRouter_->addHandler(this);
}
XMPPRosterController::~XMPPRosterController() {
-
+ iqRouter_->removeHandler(this);
}
void XMPPRosterController::requestRoster() {