Fixed tinc-up script calling on Win32.
authorBorg <borg@uu3.net>
Sat, 28 Jun 2014 12:58:09 +0000 (14:58 +0200)
committerGuus Sliepen <guus@sliepen.org>
Sat, 28 Jun 2014 20:19:16 +0000 (21:19 +0100)
It was called too early. Simple sleep fixes the issue.

src/net_setup.c

index fa4e9867a4d300215c1f45e4fcb728f1608faf0f..b11744354a438305d62048ad4da8250549f23f95 100644 (file)
@@ -713,6 +713,12 @@ static bool setup_myself(void) {
        xasprintf(&envp[2], "INTERFACE=%s", iface ? : "");
        xasprintf(&envp[3], "NAME=%s", myself->name);
 
+#ifdef HAVE_MINGW
+       Sleep(1000);
+#endif
+#ifdef HAVE_CYGWIN
+       sleep(1);
+#endif
        execute_script("tinc-up", envp);
 
        for(i = 0; i < 4; i++)