summaryrefslogtreecommitdiff
path: root/src/anytun.cpp
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2008-11-25 04:13:55 +0000
committerChristian Pointner <equinox@anytun.org>2008-11-25 04:13:55 +0000
commitea607fcc37694c55e10d0180bdaf8a676bbdf7c8 (patch)
tree9310e0c444ce30049c8b8ab0a223f7e7c2d003e0 /src/anytun.cpp
parentsmall type cleanup (diff)
options parser support ipv6 now
fixed anytun-controld - fixed log issues - added better error output - some cleanups
Diffstat (limited to 'src/anytun.cpp')
-rw-r--r--src/anytun.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/anytun.cpp b/src/anytun.cpp
index a5ea52f..258d98a 100644
--- a/src/anytun.cpp
+++ b/src/anytun.cpp
@@ -214,10 +214,8 @@ void syncConnector(void* p )
sc.run();
}
-void syncListener(SyncQueue * queue )
+void syncListener(SyncQueue * queue)
{
-// ThreadParam* param = reinterpret_cast<ThreadParam*>(p);
-
try
{
boost::asio::io_service io_service;
@@ -240,7 +238,9 @@ void syncListener(SyncQueue * queue )
}
catch (std::exception& e)
{
- std::cerr << e.what() << std::endl;
+ std::string addr = gOpt.getLocalSyncAddr() == "" ? "*" : gOpt.getLocalSyncAddr();
+ cLog.msg(Log::PRIO_ERR) << "sync: cannot bind to " << addr << ":" << gOpt.getLocalSyncPort()
+ << " (" << e.what() << ")" << std::endl;
}
}
@@ -498,7 +498,7 @@ int main(int argc, char* argv[])
gOpt.printUsage();
exit(-1);
}
-
+
cLog.msg(Log::PRIO_NOTICE) << "anytun started...";
std::ofstream pidFile;