summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2009-02-22 17:19:41 +0000
committerChristian Pointner <equinox@anytun.org>2009-02-22 17:19:41 +0000
commit6eccfc5e6e99d8f72651b2d5a93075f804e3c7fd (patch)
tree87bcf303cf9b07a02b52ff37ec5cf9a7d0a69a71
parentadded log message at windows service stop (diff)
fixed log target string parser
-rw-r--r--src/anytun.cpp6
-rw-r--r--src/anytun.suobin66048 -> 66048 bytes
-rw-r--r--src/logTargets.cpp4
3 files changed, 6 insertions, 4 deletions
diff --git a/src/anytun.cpp b/src/anytun.cpp
index 87de39a..4086c93 100644
--- a/src/anytun.cpp
+++ b/src/anytun.cpp
@@ -370,12 +370,12 @@ int main(int argc, char* argv[])
StringList targets = gOpt.getLogTargets();
if(targets.empty()) {
#ifndef _MSC_VER
- cLog.addTarget("syslog:3,anytun,daemon");
+ cLog.addTarget("syslog:3,anytun,daemon");
#else
#ifdef WIN_SERVICE
- cLog.addTarget("eventlog:3,anytun");
+ cLog.addTarget("eventlog:3,anytun");
#else
- cLog.addTarget("stdout:3");
+ cLog.addTarget("stdout:3");
#endif
#endif
}
diff --git a/src/anytun.suo b/src/anytun.suo
index 254ed37..97051e3 100644
--- a/src/anytun.suo
+++ b/src/anytun.suo
Binary files differ
diff --git a/src/logTargets.cpp b/src/logTargets.cpp
index 226dce2..9bb4cfc 100644
--- a/src/logTargets.cpp
+++ b/src/logTargets.cpp
@@ -94,7 +94,9 @@ LogTarget* LogTargetList::add(std::string conf)
char buff[100];
if(s.good()) {
- s.ignore(1);
+ s.get(buff[0]);
+ if(buff[0] != ',')
+ throw syntax_error(conf, (s.tellg() > 0) ? static_cast<size_t>(s.tellg()) - 1 : 0);
s.get(buff, 100);
}
else