[svn] commit: r2007 - in /trunk/src/bin/auth: asio_link.cc asio_link.h main.cc
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon May 31 19:26:02 UTC 2010
Author: jelte
Date: Mon May 31 19:26:02 2010
New Revision: 2007
Log:
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)
Modified:
trunk/src/bin/auth/asio_link.cc
trunk/src/bin/auth/asio_link.h
trunk/src/bin/auth/main.cc
Modified: trunk/src/bin/auth/asio_link.cc
==============================================================================
--- trunk/src/bin/auth/asio_link.cc (original)
+++ trunk/src/bin/auth/asio_link.cc Mon May 31 19:26:02 2010
@@ -409,4 +409,9 @@
IOService::stop() {
impl_->io_service_.stop();
}
-}
+
+asio::io_service&
+IOService::get_io_service() {
+ return impl_->io_service_;
+}
+}
Modified: trunk/src/bin/auth/asio_link.h
==============================================================================
--- trunk/src/bin/auth/asio_link.h (original)
+++ trunk/src/bin/auth/asio_link.h Mon May 31 19:26:02 2010
@@ -29,6 +29,7 @@
~IOService();
void run();
void stop();
+ asio::io_service& get_io_service();
private:
IOServiceImpl* impl_;
};
Modified: trunk/src/bin/auth/main.cc
==============================================================================
--- trunk/src/bin/auth/main.cc (original)
+++ trunk/src/bin/auth/main.cc Mon May 31 19:26:02 2010
@@ -145,13 +145,15 @@
auth_server = new AuthSrv;
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->updateConfig(ElementPtr());
- io_service = new asio_link::IOService(auth_server, port, use_ipv4,
- use_ipv6);
+
cout << "[b10-auth] Server started." << endl;
io_service->run();
} catch (const std::exception& ex) {
More information about the bind10-changes
mailing list