Improve error handling for network connexion (use a boolean now)
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5647 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
29a5a265ee
commit
8ea7b2d2b9
@ -45,9 +45,15 @@ bool download(std::string file, std::string save)
|
||||
fclose(fp);
|
||||
curl_easy_cleanup(session);
|
||||
if(succes == 0)
|
||||
{
|
||||
std::cout << "Download successfull" << std::endl;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Download failed... check your network connexion" << std::endl;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
int progressDownload (void *clientp, double dltotal, double dlnow, double ultotal, double ulnow)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user