]> git.meshlink.io Git - meshlink/blobdiff - src/tincd.c
Update copyright information.
[meshlink] / src / tincd.c
index a13e2661046f58d2ca64df3a423e1e0a1e492f17..b0ac6f65fb681e258b3075a446bb556adbc4a7f5 100644 (file)
@@ -2,6 +2,7 @@
     tincd.c -- the main file for tincd
     Copyright (C) 1998-2005 Ivo Timmermans
                   2000-2009 Guus Sliepen <guus@tinc-vpn.org>
+                  2009      Michael Tokarev <mjt@tls.msk.ru>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -115,6 +116,7 @@ static struct option const long_options[] = {
 
 #ifdef HAVE_MINGW
 static struct WSAData wsa_state;
+CRITICAL_SECTION mutex;
 #endif
 
 static void usage(bool status)
@@ -228,7 +230,7 @@ static bool parse_options(int argc, char **argv)
 
                                        generate_keys &= ~7;    /* Round it to bytes */
                                } else
-                                       generate_keys = 1024;
+                                       generate_keys = 2048;
                                break;
 
                        case 'R':                               /* chroot to NETNAME dir */
@@ -568,6 +570,8 @@ int main(int argc, char **argv)
 
 int main2(int argc, char **argv)
 {
+       InitializeCriticalSection(&mutex);
+       EnterCriticalSection(&mutex);
 #endif
 
        if(!detach())