mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 15:29:05 +02:00
fixes broken error handling
This commit is contained in:
parent
a0ef60efe7
commit
0a2cd9537b
2 changed files with 2 additions and 2 deletions
|
@ -54,7 +54,7 @@ bool UrlReader::perform(char const* url, transfer_callback* cb)
|
||||||
while (val_ra_size > 0 && str_error == success)
|
while (val_ra_size > 0 && str_error == success)
|
||||||
cb(0l, 0, 0, this);
|
cb(0l, 0, 0, this);
|
||||||
}
|
}
|
||||||
else if (str_error != success)
|
else if (str_error == success)
|
||||||
str_error = curl_easy_strerror(rc);
|
str_error = curl_easy_strerror(rc);
|
||||||
|
|
||||||
return rc == CURLE_OK;
|
return rc == CURLE_OK;
|
||||||
|
|
|
@ -164,7 +164,7 @@ inline char const* UrlReader::getError() const { return this->str_error; }
|
||||||
|
|
||||||
inline void UrlReader::setError(char const* static_c_string)
|
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;
|
this->str_error = static_c_string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue