diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-06-12 06:31:16 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-06-12 09:22:36 -0700 |
commit | 4d06e8f7b520625d743816afbd9e0dc6945a25db (patch) | |
tree | fae81fef7d790e887c2ce38024af0d3822daaca9 /qthelper.cpp | |
parent | 5e0c546beb48fd04758520bd3c6ff68bcc5b6d16 (diff) | |
download | subsurface-4d06e8f7b520625d743816afbd9e0dc6945a25db.tar.gz |
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>
Diffstat (limited to 'qthelper.cpp')
-rw-r--r-- | qthelper.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/qthelper.cpp b/qthelper.cpp index f918cfa72..e476df429 100644 --- a/qthelper.cpp +++ b/qthelper.cpp @@ -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(); +} |