From 8ea7b2d2b9a9d03812c20bc8f7e274ebb6a742c6 Mon Sep 17 00:00:00 2001 From: xapantu Date: Mon, 5 Jul 2010 14:21:14 +0000 Subject: [PATCH] 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 --- src/addons/network.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/addons/network.cpp b/src/addons/network.cpp index a59b26022..570b4483a 100644 --- a/src/addons/network.cpp +++ b/src/addons/network.cpp @@ -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) {