[svn] commit: r2953 - in /branches/trac327: ./ src/bin/auth/ src/bin/auth/tests/ src/lib/ src/lib/asiolink/ src/lib/asiolink/tests/
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu Sep 16 21:22:48 UTC 2010
Author: each
Date: Thu Sep 16 21:22:48 2010
New Revision: 2953
Log:
Move asio_link.cc and associated files from src/bin/auth into a new library,
src/lib/asiolink. No changes to the code itself have been made except for
the purely cosmetic one of changing the namespace and filenames from
"asio_link" to "asiolink".
Added:
branches/trac327/src/lib/asiolink/
branches/trac327/src/lib/asiolink/asiolink.cc
- copied, changed from r2934, branches/trac327/src/bin/auth/asio_link.cc
branches/trac327/src/lib/asiolink/asiolink.h
- copied, changed from r2934, branches/trac327/src/bin/auth/asio_link.h
branches/trac327/src/lib/asiolink/coroutine.h
- copied, changed from r2934, branches/trac327/src/bin/auth/coroutine.h
branches/trac327/src/lib/asiolink/tests/
branches/trac327/src/lib/asiolink/tests/Makefile.am
branches/trac327/src/lib/asiolink/tests/asio_link_unittest.cc
- copied, changed from r2934, branches/trac327/src/bin/auth/tests/asio_link_unittest.cc
branches/trac327/src/lib/asiolink/tests/run_unittests.cc
- copied, changed from r2934, branches/trac327/src/lib/datasrc/tests/run_unittests.cc
branches/trac327/src/lib/asiolink/unyield.h
- copied, changed from r2934, branches/trac327/src/bin/auth/unyield.h
branches/trac327/src/lib/asiolink/yield.h
- copied, changed from r2934, branches/trac327/src/bin/auth/yield.h
Removed:
branches/trac327/src/bin/auth/asio_link.cc
branches/trac327/src/bin/auth/asio_link.h
branches/trac327/src/bin/auth/coroutine.h
branches/trac327/src/bin/auth/tests/asio_link_unittest.cc
branches/trac327/src/bin/auth/unyield.h
branches/trac327/src/bin/auth/yield.h
Modified:
branches/trac327/configure.ac
branches/trac327/src/bin/auth/Makefile.am
branches/trac327/src/bin/auth/auth_srv.cc
branches/trac327/src/bin/auth/auth_srv.h
branches/trac327/src/bin/auth/main.cc
branches/trac327/src/bin/auth/tests/Makefile.am
branches/trac327/src/bin/auth/tests/auth_srv_unittest.cc
branches/trac327/src/lib/Makefile.am
Modified: branches/trac327/configure.ac
==============================================================================
--- branches/trac327/configure.ac (original)
+++ branches/trac327/configure.ac Thu Sep 16 21:22:48 2010
@@ -431,6 +431,8 @@
src/bin/zonemgr/tests/Makefile
src/bin/usermgr/Makefile
src/lib/Makefile
+ src/lib/asiolink/Makefile
+ src/lib/asiolink/tests/Makefile
src/lib/bench/Makefile
src/lib/bench/example/Makefile
src/lib/bench/tests/Makefile
Modified: branches/trac327/src/bin/auth/Makefile.am
==============================================================================
--- branches/trac327/src/bin/auth/Makefile.am (original)
+++ branches/trac327/src/bin/auth/Makefile.am Thu Sep 16 21:22:48 2010
@@ -3,8 +3,9 @@
AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
AM_CPPFLAGS += -I$(top_srcdir)/src/lib/dns -I$(top_builddir)/src/lib/dns
-AM_CPPFLAGS += -I$(top_builddir)/src/lib/cc
-AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
+AM_CPPFLAGS += -I$(top_srcdir)/src/lib/cc -I$(top_builddir)/src/lib/cc
+AM_CPPFLAGS += -I$(top_srcdir)/src/lib/asiolink
+AM_CPPFLAGS += -I$(top_builddir)/src/lib/asiolink
AM_CXXFLAGS = $(B10_CXXFLAGS)
@@ -32,22 +33,6 @@
spec_config.h: spec_config.h.pre
$(SED) -e "s|@@LOCALSTATEDIR@@|$(localstatedir)|" spec_config.h.pre >$@
-# This is a wrapper library solely used for b10-auth. The ASIO header files
-# have some code fragments that would hit gcc's unused-parameter warning,
-# which would make the build fail with -Werror (our default setting).
-# We don't want to lower the warning level for our own code just for ASIO,
-# so as a workaround we extract the ASIO related code into a separate library,
-# only for which we accept the unused-parameter warning.
-lib_LIBRARIES = libasio_link.a
-libasio_link_a_SOURCES = asio_link.cc asio_link.h
-# Note: the ordering matters: -Wno-... must follow -Wextra (defined in
-# B10_CXXFLAGS)
-libasio_link_a_CXXFLAGS = $(AM_CXXFLAGS)
-if USE_GXX
-libasio_link_a_CXXFLAGS += -Wno-unused-parameter
-endif
-libasio_link_a_CPPFLAGS = $(AM_CPPFLAGS)
-
BUILT_SOURCES = spec_config.h
pkglibexec_PROGRAMS = b10-auth
b10_auth_SOURCES = auth_srv.cc auth_srv.h
@@ -59,7 +44,7 @@
b10_auth_LDADD += $(top_builddir)/src/lib/config/libcfgclient.la
b10_auth_LDADD += $(top_builddir)/src/lib/cc/libcc.la
b10_auth_LDADD += $(top_builddir)/src/lib/exceptions/libexceptions.la
-b10_auth_LDADD += libasio_link.a
+b10_auth_LDADD += $(top_builddir)/src/lib/asiolink/libasiolink.a
b10_auth_LDADD += $(top_builddir)/src/lib/xfr/libxfr.la
b10_auth_LDADD += $(SQLITE_LIBS)
Modified: branches/trac327/src/bin/auth/auth_srv.cc
==============================================================================
--- branches/trac327/src/bin/auth/auth_srv.cc (original)
+++ branches/trac327/src/bin/auth/auth_srv.cc Thu Sep 16 21:22:48 2010
@@ -21,6 +21,12 @@
#include <iostream>
#include <vector>
+#include <asiolink/asiolink.h>
+
+#include <config/ccsession.h>
+
+#include <cc/data.h>
+
#include <exceptions/exceptions.h>
#include <dns/buffer.h>
@@ -31,22 +37,16 @@
#include <dns/rrset.h>
#include <dns/rrttl.h>
#include <dns/message.h>
-#include <config/ccsession.h>
-#include <cc/data.h>
-#include <exceptions/exceptions.h>
#include <datasrc/query.h>
#include <datasrc/data_source.h>
#include <datasrc/static_datasrc.h>
#include <datasrc/sqlite3_datasrc.h>
-#include <cc/data.h>
-
#include <xfr/xfrout_client.h>
#include <auth/common.h>
#include <auth/auth_srv.h>
-#include <auth/asio_link.h>
using namespace std;
@@ -58,7 +58,7 @@
using namespace isc::data;
using namespace isc::config;
using namespace isc::xfr;
-using namespace asio_link;
+using namespace asiolink;
class AuthSrvImpl {
private:
@@ -124,7 +124,7 @@
}
// This is a derived class of \c DNSProvider, to serve as a
-// callback in the asio_link module. It calls
+// callback in the asiolink module. It calls
// AuthSrv::processMessage() on a single DNS message.
class MessageProcessor : public DNSProvider {
public:
@@ -139,7 +139,7 @@
};
// This is a derived class of \c CheckinProvider, to serve
-// as a callback in the asio_link module. It checks for queued
+// as a callback in the asiolink module. It checks for queued
// configuration messages, and executes them if found.
class ConfigChecker : public CheckinProvider {
public:
@@ -165,12 +165,12 @@
delete dns_provider_;
}
-asio_link::CheckinProvider*
+asiolink::CheckinProvider*
AuthSrv::getCheckinProvider() {
return (checkin_provider_);
}
-asio_link::DNSProvider*
+asiolink::DNSProvider*
AuthSrv::getDNSProvider() {
return (dns_provider_);
}
Modified: branches/trac327/src/bin/auth/auth_srv.h
==============================================================================
--- branches/trac327/src/bin/auth/auth_srv.h (original)
+++ branches/trac327/src/bin/auth/auth_srv.h Thu Sep 16 21:22:48 2010
@@ -22,7 +22,7 @@
#include <cc/data.h>
#include <config/ccsession.h>
-#include <auth/asio_link.h>
+#include <asiolink/asiolink.h>
namespace isc {
namespace dns {
@@ -36,7 +36,7 @@
};
}
-namespace asio_link {
+namespace asiolink {
class IOMessage;
}
@@ -66,7 +66,7 @@
//@}
/// \return \c true if the \message contains a response to be returned;
/// otherwise \c false.
- bool processMessage(const asio_link::IOMessage& io_message,
+ bool processMessage(const asiolink::IOMessage& io_message,
isc::dns::Message& message,
isc::dns::MessageRenderer& response_renderer);
void setVerbose(bool on);
@@ -74,8 +74,8 @@
isc::data::ConstElementPtr updateConfig(isc::data::ConstElementPtr config);
isc::config::ModuleCCSession* configSession() const;
void setConfigSession(isc::config::ModuleCCSession* config_session);
- asio_link::CheckinProvider* getCheckinProvider();
- asio_link::DNSProvider* getDNSProvider();
+ asiolink::CheckinProvider* getCheckinProvider();
+ asiolink::DNSProvider* getDNSProvider();
///
/// Note: this interface is tentative. We'll revisit the ASIO and session
@@ -93,8 +93,8 @@
void setXfrinSession(isc::cc::AbstractSession* xfrin_session);
private:
AuthSrvImpl* impl_;
- asio_link::CheckinProvider* checkin_provider_;
- asio_link::DNSProvider* dns_provider_;
+ asiolink::CheckinProvider* checkin_provider_;
+ asiolink::DNSProvider* dns_provider_;
};
#endif // __AUTH_SRV_H
Modified: branches/trac327/src/bin/auth/main.cc
==============================================================================
--- branches/trac327/src/bin/auth/main.cc (original)
+++ branches/trac327/src/bin/auth/main.cc Thu Sep 16 21:22:48 2010
@@ -43,7 +43,7 @@
#include <auth/common.h>
#include <auth/change_user.h>
#include <auth/auth_srv.h>
-#include <auth/asio_link.h>
+#include <asiolink/asiolink.h>
using namespace std;
using namespace isc::data;
@@ -64,7 +64,7 @@
* class itself? */
AuthSrv *auth_server;
-asio_link::IOService* io_service;
+asiolink::IOService* io_service;
ConstElementPtr
my_config_handler(ConstElementPtr new_config) {
@@ -176,8 +176,8 @@
auth_server->setVerbose(verbose_mode);
cout << "[b10-auth] Server created." << endl;
- asio_link::CheckinProvider* checkin = auth_server->getCheckinProvider();
- asio_link::DNSProvider* process = auth_server->getDNSProvider();
+ asiolink::CheckinProvider* checkin = auth_server->getCheckinProvider();
+ asiolink::DNSProvider* process = auth_server->getDNSProvider();
if (address != NULL) {
// XXX: we can only specify at most one explicit address.
@@ -186,11 +186,11 @@
// We don't bother to fix this problem, however. The -a option
// is a short term workaround until we support dynamic listening
// port allocation.
- io_service = new asio_link::IOService(*port, *address,
- checkin, process);
+ io_service = new asiolink::IOService(*port, *address,
+ checkin, process);
} else {
- io_service = new asio_link::IOService(*port, use_ipv4, use_ipv6,
- checkin, process);
+ io_service = new asiolink::IOService(*port, use_ipv4, use_ipv6,
+ checkin, process);
}
cout << "[b10-auth] IOService created." << endl;
@@ -212,9 +212,9 @@
xfrin_session_established = true;
cout << "[b10-auth] Xfrin session channel established." << endl;
- // XXX: with the current interface to asio_link we have to create
+ // XXX: with the current interface to asiolink we have to create
// auth_server before io_service while Session needs io_service.
- // In a next step of refactoring we should make asio_link independent
+ // In a next step of refactoring we should make asiolink independent
// from auth_server, and create io_service, auth_server, and
// sessions in that order.
auth_server->setXfrinSession(xfrin_session);
Modified: branches/trac327/src/bin/auth/tests/Makefile.am
==============================================================================
--- branches/trac327/src/bin/auth/tests/Makefile.am (original)
+++ branches/trac327/src/bin/auth/tests/Makefile.am Thu Sep 16 21:22:48 2010
@@ -20,7 +20,6 @@
run_unittests_SOURCES += ../change_user.h ../change_user.cc
run_unittests_SOURCES += auth_srv_unittest.cc
run_unittests_SOURCES += change_user_unittest.cc
-run_unittests_SOURCES += asio_link_unittest.cc
run_unittests_SOURCES += run_unittests.cc
run_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
run_unittests_LDFLAGS = $(AM_LDFLAGS) $(GTEST_LDFLAGS)
@@ -28,10 +27,10 @@
run_unittests_LDADD += $(SQLITE_LIBS)
run_unittests_LDADD += $(top_builddir)/src/lib/datasrc/libdatasrc.la
run_unittests_LDADD += $(top_builddir)/src/lib/dns/libdns++.la
+run_unittests_LDADD += $(top_builddir)/src/lib/asiolink/libasiolink.la
run_unittests_LDADD += $(top_builddir)/src/lib/config/libcfgclient.la
run_unittests_LDADD += $(top_builddir)/src/lib/cc/libcc.la
run_unittests_LDADD += $(top_builddir)/src/lib/exceptions/libexceptions.la
-run_unittests_LDADD += $(top_builddir)/src/bin/auth/libasio_link.a
run_unittests_LDADD += $(top_builddir)/src/lib/xfr/libxfr.la
endif
Modified: branches/trac327/src/bin/auth/tests/auth_srv_unittest.cc
==============================================================================
--- branches/trac327/src/bin/auth/tests/auth_srv_unittest.cc (original)
+++ branches/trac327/src/bin/auth/tests/auth_srv_unittest.cc Thu Sep 16 21:22:48 2010
@@ -31,7 +31,7 @@
#include <xfr/xfrout_client.h>
#include <auth/auth_srv.h>
-#include <auth/asio_link.h>
+#include <asiolink/asiolink.h>
#include <dns/tests/unittest_util.h>
@@ -41,7 +41,7 @@
using namespace isc::dns;
using namespace isc::data;
using namespace isc::xfr;
-using namespace asio_link;
+using namespace asiolink;
namespace {
const char* const CONFIG_TESTDB =
Modified: branches/trac327/src/lib/Makefile.am
==============================================================================
--- branches/trac327/src/lib/Makefile.am (original)
+++ branches/trac327/src/lib/Makefile.am Thu Sep 16 21:22:48 2010
@@ -1,1 +1,1 @@
-SUBDIRS = exceptions dns cc config datasrc python xfr bench
+SUBDIRS = exceptions dns asiolink cc config datasrc python xfr bench
More information about the bind10-changes
mailing list