diff options
Diffstat (limited to 'Swift/Controllers/RosterController.cpp')
-rw-r--r-- | Swift/Controllers/RosterController.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Swift/Controllers/RosterController.cpp b/Swift/Controllers/RosterController.cpp index 15ed6a4..e79fad1 100644 --- a/Swift/Controllers/RosterController.cpp +++ b/Swift/Controllers/RosterController.cpp @@ -162,7 +162,7 @@ void RosterController::handleUIEvent(boost::shared_ptr<UIEvent> event) { item.setJID(addContactEvent->getJID()); boost::shared_ptr<RosterPayload> roster(new RosterPayload()); roster->addItem(item); - boost::shared_ptr<SetRosterRequest> request(new SetRosterRequest(roster, iqRouter_)); + SetRosterRequest::ref request = SetRosterRequest::create(roster, iqRouter_); request->onResponse.connect(boost::bind(&RosterController::handleRosterSetError, this, _1, roster)); request->send(); presenceSender_->requestSubscription(addContactEvent->getJID()); @@ -173,7 +173,7 @@ void RosterController::handleUIEvent(boost::shared_ptr<UIEvent> event) { RosterItemPayload item(removeEvent->getJID(), "", RosterItemPayload::Remove); boost::shared_ptr<RosterPayload> roster(new RosterPayload()); roster->addItem(item); - boost::shared_ptr<SetRosterRequest> request(new SetRosterRequest(roster, iqRouter_)); + SetRosterRequest::ref request = SetRosterRequest::create(roster, iqRouter_); request->onResponse.connect(boost::bind(&RosterController::handleRosterSetError, this, _1, roster)); request->send(); @@ -186,7 +186,7 @@ void RosterController::handleUIEvent(boost::shared_ptr<UIEvent> event) { item.setGroups(xmppRoster_->getGroupsForJID(contact)); boost::shared_ptr<RosterPayload> roster(new RosterPayload()); roster->addItem(item); - boost::shared_ptr<SetRosterRequest> request(new SetRosterRequest(roster, iqRouter_)); + SetRosterRequest::ref request = SetRosterRequest::create(roster, iqRouter_); request->onResponse.connect(boost::bind(&RosterController::handleRosterSetError, this, _1, roster)); request->send(); return; @@ -210,7 +210,7 @@ void RosterController::handleUIEvent(boost::shared_ptr<UIEvent> event) { item.setGroups(newGroups); boost::shared_ptr<RosterPayload> roster(new RosterPayload()); roster->addItem(item); - boost::shared_ptr<SetRosterRequest> request(new SetRosterRequest(roster, iqRouter_)); + SetRosterRequest::ref request = SetRosterRequest::create(roster, iqRouter_); request->onResponse.connect(boost::bind(&RosterController::handleRosterSetError, this, _1, roster)); request->send(); return; |