summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-11 22:17:13 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-14 11:04:42 -0400
commitb047f17c13d3fd7c8830ff2ce2eebf14a9e9940f (patch)
tree94cef0433c11a038c144b163bdd104b4dd190526
parent8e18c860a98b79ba109ad3d133c9db84593f071f (diff)
downloadsubsurface-b047f17c13d3fd7c8830ff2ce2eebf14a9e9940f.tar.gz
Disable https connection for cross builds using mingw32
Not my preferred solution, but better than disabling divelogs.de uploads for people using the Windows binary. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--webservice.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/webservice.c b/webservice.c
index 580880aa5..f17d89623 100644
--- a/webservice.c
+++ b/webservice.c
@@ -366,7 +366,14 @@ int divelogde_upload(char *fn, char **error)
SoupSession *session;
SoupBuffer *sbuf;
gboolean ret = FALSE;
+#ifdef __MINGW32__
+ /* for odd reasons I can't seem to get https connections to work
+ * with mingw32 when cross-building the Windows binaries... so fall
+ * back to http for now */
+ char url[256] = "http://divelogs.de/DivelogsDirectImport.php";
+#else
char url[256] = "https://divelogs.de/DivelogsDirectImport.php";
+#endif
const char *pass = NULL;
const char *user = NULL;
struct memblock mem;