X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Ftincd.c;h=1f3644270aa44a715db950bbadd590faf9939cd4;hp=a13e2661046f58d2ca64df3a423e1e0a1e492f17;hb=ab7c61b06f6c6e991225f2fcc32d02b8e1084aee;hpb=73d77dd416b87b7c4e9b6aa450f64846235cd2b4 diff --git a/src/tincd.c b/src/tincd.c index a13e2661..1f364427 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 @@ -13,11 +14,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - 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$ + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #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())