Cloud storage: check connection before connecting

libgit2 takes forever (a minute or so) to figure out that it can't connect
to a remote server.
So if we are using https as connection protocol, quickly check utilizing
RFCs 2324/7168 to make sure we can reach the cloud server (and not some
captive portal or something).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-06-12 06:31:16 -07:00
parent 5e0c546beb
commit 4d06e8f7b5
4 changed files with 61 additions and 1 deletions

View file

@ -33,6 +33,7 @@
#include <QImageReader>
#include <QtConcurrent>
#include "divepicturewidget.h"
#include "subsurfacewebservices.h"
#include <libxslt/documents.h>
@ -1051,3 +1052,8 @@ extern "C" bool getProxyString(char **buffer)
}
return false;
}
extern "C" bool canReachCloudServer()
{
return CheckCloudConnection::checkServer();
}