summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-11-28 12:08:54 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-11-28 12:18:04 (GMT)
commitf4e2f1deecd322e859bfb27bc5a9ab97726481c5 (patch)
treeb50dc4515108f5a19cbbd4b615cff01c13c5866c /Swiften/MUC
parent5caf2316dad81d6c02ff3e886a65121011ccc9fe (diff)
downloadswift-contrib-f4e2f1deecd322e859bfb27bc5a9ab97726481c5.zip
swift-contrib-f4e2f1deecd322e859bfb27bc5a9ab97726481c5.tar.bz2
Change error from optional to shared_ptr in GenericRequest
Resolves: #692
Diffstat (limited to 'Swiften/MUC')
-rw-r--r--Swiften/MUC/MUC.cpp5
-rw-r--r--Swiften/MUC/MUC.h2
-rw-r--r--Swiften/MUC/MUCBookmarkManager.cpp2
-rw-r--r--Swiften/MUC/MUCBookmarkManager.h2
4 files changed, 5 insertions, 6 deletions
diff --git a/Swiften/MUC/MUC.cpp b/Swiften/MUC/MUC.cpp
index 86c8ca9..4185fa8 100644
--- a/Swiften/MUC/MUC.cpp
+++ b/Swiften/MUC/MUC.cpp
@@ -175,10 +175,9 @@ void MUC::handleIncomingPresence(boost::shared_ptr<Presence> presence) {
}
-void MUC::handleCreationConfigResponse(boost::shared_ptr<MUCOwnerPayload> /*unused*/, const boost::optional<ErrorPayload>& error) {
+void MUC::handleCreationConfigResponse(boost::shared_ptr<MUCOwnerPayload> /*unused*/, ErrorPayload::ref error) {
if (error) {
- boost::shared_ptr<ErrorPayload> errorCopy(new ErrorPayload(*error));
- onJoinFailed(errorCopy);
+ onJoinFailed(error);
} else {
/* onJoinComplete(getOwnNick()); isn't needed here, the presence will cause an emit elsewhere. */
presenceSender->addDirectedPresenceReceiver(ownMUCJID);
diff --git a/Swiften/MUC/MUC.h b/Swiften/MUC/MUC.h
index 3539e49..56cd392 100644
--- a/Swiften/MUC/MUC.h
+++ b/Swiften/MUC/MUC.h
@@ -76,7 +76,7 @@ namespace Swift {
private:
void handleIncomingPresence(boost::shared_ptr<Presence> presence);
void internalJoin(const String& nick);
- void handleCreationConfigResponse(boost::shared_ptr<MUCOwnerPayload>, const boost::optional<ErrorPayload>&);
+ void handleCreationConfigResponse(boost::shared_ptr<MUCOwnerPayload>, ErrorPayload::ref);
private:
JID ownMUCJID;
diff --git a/Swiften/MUC/MUCBookmarkManager.cpp b/Swiften/MUC/MUCBookmarkManager.cpp
index 0f5f3bb..d0855cd 100644
--- a/Swiften/MUC/MUCBookmarkManager.cpp
+++ b/Swiften/MUC/MUCBookmarkManager.cpp
@@ -24,7 +24,7 @@ MUCBookmarkManager::MUCBookmarkManager(IQRouter* iqRouter) {
request->send();
}
-void MUCBookmarkManager::handleBookmarksReceived(boost::shared_ptr<Storage> payload, const boost::optional<ErrorPayload>& error) {
+void MUCBookmarkManager::handleBookmarksReceived(boost::shared_ptr<Storage> payload, ErrorPayload::ref error) {
if (error) {
return;
}
diff --git a/Swiften/MUC/MUCBookmarkManager.h b/Swiften/MUC/MUCBookmarkManager.h
index 35f5447..39699df 100644
--- a/Swiften/MUC/MUCBookmarkManager.h
+++ b/Swiften/MUC/MUCBookmarkManager.h
@@ -39,7 +39,7 @@ namespace Swift {
private:
bool containsEquivalent(const std::vector<MUCBookmark>& list, const MUCBookmark& bookmark);
- void handleBookmarksReceived(boost::shared_ptr<Storage> payload, const boost::optional<ErrorPayload>& error);
+ void handleBookmarksReceived(boost::shared_ptr<Storage> payload, ErrorPayload::ref error);
void flush();
private: