summaryrefslogtreecommitdiff
path: root/node
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2013-12-10 16:13:07 -0800
committerAdam Ierymenko <adam.ierymenko@gmail.com>2013-12-10 16:13:07 -0800
commitd3bcc58074d608639176ce3cd30fa7c5307676b9 (patch)
tree95914c03f9f422e3a5ef5e1c52a69fe441523783 /node
parentbf0da9f2f778aeb3eebe200a8cdeecbc6e1f9253 (diff)
downloadinfinitytier-d3bcc58074d608639176ce3cd30fa7c5307676b9.tar.gz
infinitytier-d3bcc58074d608639176ce3cd30fa7c5307676b9.zip
Fix update URL stuff, fix main build, add update dummy for testing updates on OSX and Linux and such.
Diffstat (limited to 'node')
-rw-r--r--node/Defaults.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/node/Defaults.cpp b/node/Defaults.cpp
index 566658fa..2588c85f 100644
--- a/node/Defaults.cpp
+++ b/node/Defaults.cpp
@@ -122,8 +122,26 @@ static inline std::map< Address,Identity > _mkUpdateAuth()
return ua;
}
-static inline std::string _mkUpdateUrl()
+static inline const char *_mkUpdateUrl()
{
+#if defined(__LINUX__) && ( defined(__i386__) || defined(__x86_64) || defined(__x86_64__) || defined(__amd64) || defined(__i386) )
+ if (sizeof(void *) == 8)
+ return "http://download.zerotier.com/update/linux/x64/latest.nfo";
+ else return "http://download.zerotier.com/update/linux/x86/latest.nfo";
+#define GOT_UPDATE_URL
+#endif
+
+#ifdef __APPLE__
+ // TODO: iOS?
+ return "http://download.zerotier.com/update/mac/combined/latest.nfo";
+#define GOT_UPDATE_URL
+#endif
+
+ // TODO: Windows
+
+#ifndef GOT_UPDATE_URL
+ return "";
+#endif
}
Defaults::Defaults() :