summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@zerotier.com>2014-08-21 17:49:05 -0700
committerAdam Ierymenko <adam.ierymenko@zerotier.com>2014-08-21 17:49:05 -0700
commitde4e29288d30183ca78a5e0878431ed47fa58b8f (patch)
tree5b944e4176ead99473b2457386de315aa87aa405 /main.cpp
parent44d58ee871c498646213c01d1cd0417c2d537056 (diff)
downloadinfinitytier-de4e29288d30183ca78a5e0878431ed47fa58b8f.tar.gz
infinitytier-de4e29288d30183ca78a5e0878431ed47fa58b8f.zip
Fix for crazy Windows threading bug... repeatedly adding and removing a network now doesn't leave networks in limbo.
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/main.cpp b/main.cpp
index f9c8645f..9743a74d 100644
--- a/main.cpp
+++ b/main.cpp
@@ -25,6 +25,10 @@
* LLC. Start here: http://www.zerotier.com/
*/
+// Uncomment on Windows to assume -C and run in console instead of service
+// Useful for Visual Studio debugging (launch VS as Administrator to run)
+#define ZT_WIN_RUN_IN_CONSOLE
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -586,12 +590,18 @@ int main(int argc,char **argv)
const char *homeDir = (const char *)0;
unsigned int udpPort = ZT_DEFAULT_UDP_PORT;
unsigned int tcpPort = 0;
+
#ifdef __UNIX_LIKE__
bool runAsDaemon = false;
#endif
#ifdef __WINDOWS__
+#ifdef ZT_WIN_RUN_IN_CONSOLE
+ bool winRunFromCommandLine = true;
+#else
bool winRunFromCommandLine = false;
#endif
+#endif // __WINDOWS__
+
for(int i=1;i<argc;++i) {
if (argv[i][0] == '-') {
switch(argv[i][1]) {