fixes broken error handling

This commit is contained in:
tosh 2013-03-27 06:39:27 +01:00
parent a0ef60efe7
commit 0a2cd9537b
2 changed files with 2 additions and 2 deletions

View file

@ -54,7 +54,7 @@ bool UrlReader::perform(char const* url, transfer_callback* cb)
while (val_ra_size > 0 && str_error == success)
cb(0l, 0, 0, this);
}
else if (str_error != success)
else if (str_error == success)
str_error = curl_easy_strerror(rc);
return rc == CURLE_OK;

View file

@ -164,7 +164,7 @@ inline char const* UrlReader::getError() const { return this->str_error; }
inline void UrlReader::setError(char const* static_c_string)
{
if (this->str_error != success)
if (this->str_error == success)
this->str_error = static_c_string;
}