Skip to content

Commit

Permalink
Merge pull request #6885 from koying/addfallbackinet
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkins4kodi committed May 23, 2015
2 parents f111910 + 9a09d8e commit 8c6fed2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion xbmc/filesystem/CurlFile.cpp
Expand Up @@ -902,8 +902,15 @@ bool CCurlFile::Download(const std::string& strURL, const std::string& strFileNa
// Detect whether we are "online" or not! Very simple and dirty!
bool CCurlFile::IsInternet()
{
CURL url("http://www.google.com");
CURL url("http://www.msftncsi.com/ncsi.txt");
bool found = Exists(url);
if (!found)
{
// fallback
Close();
url.Parse("http://www.w3.org/");
found = Exists(url);
}
Close();

return found;
Expand Down

0 comments on commit 8c6fed2

Please sign in to comment.