cloudstorage: try alternative server if first connection fails

If we can't reach our preferred server, try using a different one.
The diff makes more sense when ignoring white space.

With this we check the connection to the cloud server much earlier and
in case of failure to connect try a different cloud_base_url.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2021-04-16 12:55:05 -07:00
parent fe074ccad1
commit 766f297bc4
4 changed files with 84 additions and 36 deletions

View file

@ -15,6 +15,7 @@ extern "C" {
#include <stdbool.h>
#endif
#define CLOUD_NUM_HOSTS 2
#define CLOUD_HOST_US "ssrf-cloud-us.subsurface-divelog.org"
#define CLOUD_HOST_EU "ssrf-cloud-eu.subsurface-divelog.org"
#define CLOUD_HOST_PATTERN "ssrf-cloud-..\\.subsurface-divelog\\.org"