Permalink
Browse files

bugfix: "error 0" is shown sometimes instead of the actual HTTP statu…

…s code
  • Loading branch information...
1 parent 89c3d61 commit c0445097a3248f3853029667dc97df550bc6be44 Tim Lebedkov committed Feb 3, 2016
Showing with 8 additions and 3 deletions.
  1. +8 −3 wpmcpp/src/downloader.cpp
@@ -213,9 +213,14 @@ int64_t Downloader::downloadWin(Job* job, const Request& request,
//qDebug() << callNumber << r << dwStatus << url.toString();
if (r == ERROR_SUCCESS) {
- QString errMsg;
- WPMUtils::formatMessage(sendRequestError, &errMsg);
- job->setErrorMessage(errMsg);
+ if (sendRequestError) {
+ QString errMsg;
+ WPMUtils::formatMessage(sendRequestError, &errMsg);
+ job->setErrorMessage(errMsg);
+ } else {
+ job->setErrorMessage(QString(
+ QObject::tr("HTTP status code %1")).arg(dwStatus));
+ }
} else if (r == ERROR_INTERNET_FORCE_RETRY) {
// nothing
} else if (r == ERROR_CANCELLED) {

0 comments on commit c044509

Please sign in to comment.