summaryrefslogtreecommitdiffstats
path: root/src/uscxml/URL.cpp
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-03-22 18:26:20 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-03-22 18:26:20 (GMT)
commitc7f8f82d632f3d205ef6de6377115ea0f7536302 (patch)
treee9b3246ac897f31293a8592ac836562f6e454d00 /src/uscxml/URL.cpp
parentaed71bb1cc4209156f132b34041982521bf78025 (diff)
downloaduscxml-c7f8f82d632f3d205ef6de6377115ea0f7536302.zip
uscxml-c7f8f82d632f3d205ef6de6377115ea0f7536302.tar.gz
uscxml-c7f8f82d632f3d205ef6de6377115ea0f7536302.tar.bz2
Use actual curl message for errors regarding URLs
Diffstat (limited to 'src/uscxml/URL.cpp')
-rw-r--r--src/uscxml/URL.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/uscxml/URL.cpp b/src/uscxml/URL.cpp
index 7036e0a..a31b0c4 100644
--- a/src/uscxml/URL.cpp
+++ b/src/uscxml/URL.cpp
@@ -106,10 +106,10 @@ void URLImpl::downloadCompleted() {
}
}
-void URLImpl::downloadFailed(int errorCode) {
+void URLImpl::downloadFailed(CURLcode errorCode) {
tthread::lock_guard<tthread::recursive_mutex> lock(_mutex);
- LOG(ERROR) << "Downloading " << asString() << " failed: " << strerror(errorCode);
+ LOG(ERROR) << "Downloading " << asString() << " failed: " << curl_easy_strerror(errorCode);
_hasFailed = true;
_isDownloaded = false;
@@ -392,7 +392,7 @@ void URLFetcher::breakURL(URL& url) {
tthread::lock_guard<tthread::recursive_mutex> lock(instance->_mutex);
if (instance->_handlesToURLs.find(handle) != instance->_handlesToURLs.end()) {
- url.downloadFailed(0);
+ url.downloadFailed(CURLE_OK);
curl_multi_remove_handle(instance->_multiHandle, handle);
instance->_handlesToURLs.erase(handle);
}
@@ -496,6 +496,8 @@ void URLFetcher::perform() {
curl_multi_remove_handle(_multiHandle, msg->easy_handle);
_handlesToURLs.erase(msg->easy_handle);
break;
+ default:
+ LOG(ERROR) << "Unhandled curl status";
case CURLM_BAD_HANDLE:
case CURLM_BAD_EASY_HANDLE:
case CURLM_OUT_OF_MEMORY:
@@ -506,8 +508,6 @@ void URLFetcher::perform() {
_handlesToURLs[msg->easy_handle].downloadFailed(msg->data.result);
curl_multi_remove_handle(_multiHandle, msg->easy_handle);
_handlesToURLs.erase(msg->easy_handle);
- default:
- LOG(ERROR) << "Unhandled curl status";
break;
}
} else {