d->httpPendingRequests.push_back(req);
}
+void Root::cancelHTTPRequest(HTTP::Request *req, const std::string &reason)
+{
+ if (d->http) {
+ d->http->cancelRequest(req, reason);
+ }
+
+ std::deque<HTTP::Request_ptr>::iterator it = std::find(d->httpPendingRequests.begin(),
+ d->httpPendingRequests.end(),
+ req);
+ if (it != d->httpPendingRequests.end()) {
+ d->httpPendingRequests.erase(it);
+ }
+}
+
Root::Root(const SGPath& aPath, const std::string& aVersion) :
d(new RootPrivate)
{
}
// and remove it from the active collection
- d->catalogs.erase(catIt);
- }
+ if (catIt != d->catalogs.end()) {
+ d->catalogs.erase(catIt);
+ }
+ } // of catalog has errors case
if (d->refreshing.empty()) {
d->fireRefreshStatus(CatalogRef(), Delegate::STATUS_REFRESHED);