diff options
author | Othmar Gsenger <otti@anytun.org> | 2008-12-22 02:07:53 +0000 |
---|---|---|
committer | Othmar Gsenger <otti@anytun.org> | 2008-12-22 02:07:53 +0000 |
commit | 6a9b05a4483d9f23bcccb6b203ad387229c11de0 (patch) | |
tree | 6284c640ac52c6d08c512a795c21a729ac213866 /src/anytun-controld.cpp | |
parent | catching no route exceptions (diff) |
fixed anytun-controld
return value is missing again
Diffstat (limited to 'src/anytun-controld.cpp')
-rw-r--r-- | src/anytun-controld.cpp | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/anytun-controld.cpp b/src/anytun-controld.cpp index e074d0c..64f7570 100644 --- a/src/anytun-controld.cpp +++ b/src/anytun-controld.cpp @@ -61,8 +61,9 @@ void syncOnConnect(SyncTcpConnection * connptr) } } -bool syncListenerInit(boost::asio::io_service& io_service) +void syncListener() { + boost::asio::io_service io_service; try { SyncTcpConnection::proto::resolver resolver(io_service); @@ -86,14 +87,9 @@ bool syncListenerInit(boost::asio::io_service& io_service) std::string addr = gOpt.getBindToAddr() == "" ? "*" : gOpt.getBindToAddr(); cLog.msg(Log::PRIO_ERR) << "cannot bind to " << addr << ":" << gOpt.getBindToPort() << " (" << e.what() << ") exiting.." << std::endl; - return false; + //return false; } - return true; -} - -void syncListener(boost::asio::io_service* io_service) -{ - io_service->run(); + //return true; } int main(int argc, char* argv[]) @@ -145,11 +141,8 @@ int main(int argc, char* argv[]) SignalController sig; sig.init(); - boost::asio::io_service io_service; - if(!syncListenerInit(io_service)) - return -1; boost::thread * syncListenerThread; - syncListenerThread = new boost::thread(boost::bind(syncListener, &io_service)); + syncListenerThread = new boost::thread(boost::bind(syncListener)); int ret = sig.run(); |