From ea607fcc37694c55e10d0180bdaf8a676bbdf7c8 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Tue, 25 Nov 2008 04:13:55 +0000 Subject: options parser support ipv6 now fixed anytun-controld - fixed log issues - added better error output - some cleanups --- src/anytun.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/anytun.cpp') 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(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; -- cgit v1.2.3