Commit f28f0da3 authored by Jelte Jansen's avatar Jelte Jansen
Browse files

Use asio's io_service for the msgq handling in auth as well. Needed to add a...

Use asio's io_service for the msgq handling in auth as well. Needed to add a getter for the io_service to asio_link. This may very wel come under reconsideration for the next release, but it is needed right now to get it to work again ;)

(most likely refactor is to move the ModuleCCSession into the link or maybe even into AuthSrv itself)


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@2007 e5f2f494-b856-4b98-b285-d166d9295462
parent 0519ea65
...@@ -409,4 +409,9 @@ void ...@@ -409,4 +409,9 @@ void
IOService::stop() { IOService::stop() {
impl_->io_service_.stop(); impl_->io_service_.stop();
} }
asio::io_service&
IOService::get_io_service() {
return impl_->io_service_;
}
} }
...@@ -29,6 +29,7 @@ public: ...@@ -29,6 +29,7 @@ public:
~IOService(); ~IOService();
void run(); void run();
void stop(); void stop();
asio::io_service& get_io_service();
private: private:
IOServiceImpl* impl_; IOServiceImpl* impl_;
}; };
......
...@@ -145,13 +145,15 @@ main(int argc, char* argv[]) { ...@@ -145,13 +145,15 @@ main(int argc, char* argv[]) {
auth_server = new AuthSrv; auth_server = new AuthSrv;
auth_server->setVerbose(verbose_mode); auth_server->setVerbose(verbose_mode);
ModuleCCSession cs(specfile, my_config_handler, my_command_handler); io_service = new asio_link::IOService(auth_server, port, use_ipv4,
use_ipv6);
ModuleCCSession cs(specfile, io_service->get_io_service(), my_config_handler, my_command_handler);
auth_server->setConfigSession(&cs); auth_server->setConfigSession(&cs);
auth_server->updateConfig(ElementPtr()); auth_server->updateConfig(ElementPtr());
io_service = new asio_link::IOService(auth_server, port, use_ipv4,
use_ipv6);
cout << "[b10-auth] Server started." << endl; cout << "[b10-auth] Server started." << endl;
io_service->run(); io_service->run();
} catch (const std::exception& ex) { } catch (const std::exception& ex) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment