From 4d06e8f7b520625d743816afbd9e0dc6945a25db Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 12 Jun 2015 06:31:16 -0700 Subject: 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 --- qthelper.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'qthelper.cpp') diff --git a/qthelper.cpp b/qthelper.cpp index f918cfa72..e476df429 100644 --- a/qthelper.cpp +++ b/qthelper.cpp @@ -33,6 +33,7 @@ #include #include #include "divepicturewidget.h" +#include "subsurfacewebservices.h" #include @@ -1051,3 +1052,8 @@ extern "C" bool getProxyString(char **buffer) } return false; } + +extern "C" bool canReachCloudServer() +{ + return CheckCloudConnection::checkServer(); +} -- cgit v1.2.3-70-g09d2