X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Ftincd.c;h=4eba1f59dbd8e50cb1a7ceb504eba42cd8f483d4;hp=a13e2661046f58d2ca64df3a423e1e0a1e492f17;hb=c217d214f4f071c235bc7c463a1da6124e2570a6;hpb=73d77dd416b87b7c4e9b6aa450f64846235cd2b4 diff --git a/src/tincd.c b/src/tincd.c index a13e2661..4eba1f59 100644 --- a/src/tincd.c +++ b/src/tincd.c @@ -2,6 +2,7 @@ tincd.c -- the main file for tincd Copyright (C) 1998-2005 Ivo Timmermans 2000-2009 Guus Sliepen + 2009 Michael Tokarev 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 @@ -16,8 +17,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #include "system.h" @@ -115,6 +114,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 +228,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 +568,8 @@ int main(int argc, char **argv) int main2(int argc, char **argv) { + InitializeCriticalSection(&mutex); + EnterCriticalSection(&mutex); #endif if(!detach())