summaryrefslogtreecommitdiff
path: root/src/anytun.cpp
diff options
context:
space:
mode:
authorOthmar Gsenger <otti@anytun.org>2010-01-11 02:40:06 +0000
committerOthmar Gsenger <otti@anytun.org>2010-01-11 02:40:06 +0000
commit54dc97608c637613a67600cdf566ba875d28a9b6 (patch)
tree1d5316fc7f7b28be4c558ef3821411367156acd4 /src/anytun.cpp
parentfixed line indention (diff)
cleaned up crypto init
cleaned up default log targets
Diffstat (limited to 'src/anytun.cpp')
-rw-r--r--src/anytun.cpp28
1 files changed, 4 insertions, 24 deletions
diff --git a/src/anytun.cpp b/src/anytun.cpp
index e7afbd5..6ae4217 100644
--- a/src/anytun.cpp
+++ b/src/anytun.cpp
@@ -380,22 +380,8 @@ int main(int argc, char* argv[])
exit(0);
}
StringList targets = gOpt.getLogTargets();
- if(targets.empty()) {
-#ifndef _MSC_VER
- cLog.addTarget("syslog:3,anytun,daemon");
-#else
- #ifdef WIN_SERVICE
- cLog.addTarget("eventlog:3,anytun");
- #else
- cLog.addTarget("stdout:3");
- #endif
-#endif
- }
- else {
- StringList::const_iterator it;
- for(it = targets.begin();it != targets.end(); ++it)
- cLog.addTarget(*it);
- }
+ for(StringList::const_iterator it = targets.begin();it != targets.end(); ++it)
+ cLog.addTarget(*it);
}
catch(syntax_error& e)
{
@@ -454,14 +440,8 @@ int main(int argc, char* argv[])
if (postup_script)
boost::thread(boost::bind(&SysExec::waitForScript,postup_script));
#endif
-#ifndef NO_CRYPT
-#ifndef USE_SSL_CRYPTO
-// this must be called before any other libgcrypt call
- if(!initLibGCrypt())
- return -1;
-#endif
-#endif
-
+ initCrypto();
+
PacketSource* src = new UDPPacketSource(gOpt.getLocalAddr(), gOpt.getLocalPort());
if(gOpt.getRemoteAddr() != "")