[svn] commit: r1276 - /trunk/src/bin/auth/main.cc
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed Mar 10 10:37:20 UTC 2010
Author: jelte
Date: Wed Mar 10 10:37:20 2010
New Revision: 1276
Log:
oops, forgot ifdef BOOST_LIB for that io_service
also fixed command handling and shutdown for non-boost version
Modified:
trunk/src/bin/auth/main.cc
Modified: trunk/src/bin/auth/main.cc
==============================================================================
--- trunk/src/bin/auth/main.cc (original)
+++ trunk/src/bin/auth/main.cc Wed Mar 10 10:37:20 2010
@@ -73,9 +73,13 @@
* class itself? */
namespace {
AuthSrv *auth_server;
+#ifdef HAVE_BOOSTLIB
// TODO: this should be a property of AuthSrv, and AuthSrv needs
// a stop() method (so the shutdown command can be handled)
boost::asio::io_service io_service_;
+#else
+ bool running;
+#endif
}
static ElementPtr
@@ -92,7 +96,11 @@
/* let's add that message to our answer as well */
answer->get("result")->add(args);
} else if (command == "shutdown") {
+#ifdef HAVE_BOOSTLIB
io_service_.stop();
+#else
+ running = false;
+#endif
}
return answer;
@@ -555,9 +563,11 @@
OutputBuffer resonse_buffer(0);
MessageRenderer response_renderer(resonse_buffer);
- while (true) {
+ running = true;
+ while (running) {
fd_set fds = fds_base;
FD_SET(ss, &fds);
+ ++nfds;
int n = select(nfds, &fds, NULL, NULL, NULL);
if (n < 0) {
More information about the bind10-changes
mailing list