diff options
author | Christian Pointner <equinox@anytun.org> | 2008-11-25 04:13:55 +0000 |
---|---|---|
committer | Christian Pointner <equinox@anytun.org> | 2008-11-25 04:13:55 +0000 |
commit | ea607fcc37694c55e10d0180bdaf8a676bbdf7c8 (patch) | |
tree | 9310e0c444ce30049c8b8ab0a223f7e7c2d003e0 /src/anytun.cpp | |
parent | small 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.cpp | 10 |
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; |