diff options
Diffstat (limited to 'Swift/Controllers/Chat/MUCSearchController.cpp')
| -rw-r--r-- | Swift/Controllers/Chat/MUCSearchController.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Swift/Controllers/Chat/MUCSearchController.cpp b/Swift/Controllers/Chat/MUCSearchController.cpp index 5db917a..0b54d25 100644 --- a/Swift/Controllers/Chat/MUCSearchController.cpp +++ b/Swift/Controllers/Chat/MUCSearchController.cpp | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2010-2016 Isode Limited. | 2 | * Copyright (c) 2010-2019 Isode Limited. |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * See the COPYING file for more information. | 4 | * See the COPYING file for more information. |
| 5 | */ | 5 | */ |
| @@ -92,7 +92,7 @@ void MUCSearchController::handleSearchService(const JID& jid) { | |||
| 92 | delete walker_; | 92 | delete walker_; |
| 93 | } | 93 | } |
| 94 | 94 | ||
| 95 | SWIFT_LOG(debug) << "Starting walking MUC services" << std::endl; | 95 | SWIFT_LOG(debug) << "Starting walking MUC services"; |
| 96 | itemsInProgress_ = 0; | 96 | itemsInProgress_ = 0; |
| 97 | walker_ = new DiscoServiceWalker(jid, iqRouter_); | 97 | walker_ = new DiscoServiceWalker(jid, iqRouter_); |
| 98 | walker_->onServiceFound.connect(boost::bind(&MUCSearchController::handleDiscoServiceFound, this, _1, _2)); | 98 | walker_->onServiceFound.connect(boost::bind(&MUCSearchController::handleDiscoServiceFound, this, _1, _2)); |
| @@ -113,14 +113,14 @@ void MUCSearchController::handleDiscoServiceFound(const JID& jid, std::shared_pt | |||
| 113 | } | 113 | } |
| 114 | } | 114 | } |
| 115 | if (isMUC) { | 115 | if (isMUC) { |
| 116 | SWIFT_LOG(debug) << "MUC Service found: " << jid << std::endl; | 116 | SWIFT_LOG(debug) << "MUC Service found: " << jid; |
| 117 | services_.erase(std::remove(services_.begin(), services_.end(), jid), services_.end()); | 117 | services_.erase(std::remove(services_.begin(), services_.end(), jid), services_.end()); |
| 118 | services_.push_back(jid); | 118 | services_.push_back(jid); |
| 119 | serviceDetails_[jid].setName(name); | 119 | serviceDetails_[jid].setName(name); |
| 120 | serviceDetails_[jid].setJID(jid); | 120 | serviceDetails_[jid].setJID(jid); |
| 121 | serviceDetails_[jid].setComplete(false); | 121 | serviceDetails_[jid].setComplete(false); |
| 122 | itemsInProgress_++; | 122 | itemsInProgress_++; |
| 123 | SWIFT_LOG(debug) << "Requesting items of " << jid << " (" << itemsInProgress_ << " item requests in progress)" << std::endl; | 123 | SWIFT_LOG(debug) << "Requesting items of " << jid << " (" << itemsInProgress_ << " item requests in progress)"; |
| 124 | GetDiscoItemsRequest::ref discoItemsRequest = GetDiscoItemsRequest::create(jid, iqRouter_); | 124 | GetDiscoItemsRequest::ref discoItemsRequest = GetDiscoItemsRequest::create(jid, iqRouter_); |
| 125 | discoItemsRequest->onResponse.connect(boost::bind(&MUCSearchController::handleRoomsItemsResponse, this, _1, _2, jid)); | 125 | discoItemsRequest->onResponse.connect(boost::bind(&MUCSearchController::handleRoomsItemsResponse, this, _1, _2, jid)); |
| 126 | discoItemsRequest->send(); | 126 | discoItemsRequest->send(); |
| @@ -132,7 +132,7 @@ void MUCSearchController::handleDiscoServiceFound(const JID& jid, std::shared_pt | |||
| 132 | } | 132 | } |
| 133 | 133 | ||
| 134 | void MUCSearchController::handleDiscoWalkFinished() { | 134 | void MUCSearchController::handleDiscoWalkFinished() { |
| 135 | SWIFT_LOG(debug) << "MUC Walk finished" << std::endl; | 135 | SWIFT_LOG(debug) << "MUC Walk finished"; |
| 136 | updateInProgressness(); | 136 | updateInProgressness(); |
| 137 | } | 137 | } |
| 138 | 138 | ||
| @@ -144,7 +144,7 @@ void MUCSearchController::removeService(const JID& jid) { | |||
| 144 | 144 | ||
| 145 | void MUCSearchController::handleRoomsItemsResponse(std::shared_ptr<DiscoItems> items, ErrorPayload::ref error, const JID& jid) { | 145 | void MUCSearchController::handleRoomsItemsResponse(std::shared_ptr<DiscoItems> items, ErrorPayload::ref error, const JID& jid) { |
| 146 | itemsInProgress_--; | 146 | itemsInProgress_--; |
| 147 | SWIFT_LOG(debug) << "Items received for " << jid << " (" << itemsInProgress_ << " item requests in progress)" << std::endl; | 147 | SWIFT_LOG(debug) << "Items received for " << jid << " (" << itemsInProgress_ << " item requests in progress)"; |
| 148 | updateInProgressness(); | 148 | updateInProgressness(); |
| 149 | if (error) { | 149 | if (error) { |
| 150 | handleDiscoError(jid, error); | 150 | handleDiscoError(jid, error); |
Swift