Skip to content

Commit

Permalink
ADD: add a fallback site for internet detection
Browse files Browse the repository at this point in the history
Somehow, google might be blocked ("Great Wall", firewall, proxy).
Little chance anyone would care to block w3c ;)
  • Loading branch information
koying committed Apr 6, 2015
1 parent d6e4ad3 commit 286cc99
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions xbmc/filesystem/CurlFile.cpp
Expand Up @@ -896,6 +896,13 @@ bool CCurlFile::IsInternet()
{
CURL url("http://www.google.com");
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 286cc99

Please sign in to comment.