BIND 10 trac1976, updated. 6a56ac9b0e5bd227af1730fe4cd8adbd36d03d00 [1976] A transitional class to wrap a client to list
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu Jun 21 13:15:41 UTC 2012
The branch, trac1976 has been updated
via 6a56ac9b0e5bd227af1730fe4cd8adbd36d03d00 (commit)
from 6107757547e99687e84c8c19f412801ac926a342 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 6a56ac9b0e5bd227af1730fe4cd8adbd36d03d00
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date: Thu Jun 21 15:14:48 2012 +0200
[1976] A transitional class to wrap a client to list
-----------------------------------------------------------------------
Summary of changes:
src/bin/auth/Makefile.am | 2 +-
src/bin/auth/list.h | 33 +++++++++++++++++++++++++++++++++
2 files changed, 34 insertions(+), 1 deletion(-)
create mode 100644 src/bin/auth/list.h
-----------------------------------------------------------------------
diff --git a/src/bin/auth/Makefile.am b/src/bin/auth/Makefile.am
index 1f0fbbf..c399521 100644
--- a/src/bin/auth/Makefile.am
+++ b/src/bin/auth/Makefile.am
@@ -49,7 +49,7 @@ b10_auth_SOURCES += command.cc command.h
b10_auth_SOURCES += common.h common.cc
b10_auth_SOURCES += statistics.cc statistics.h
b10_auth_SOURCES += datasrc_configurator.h
-b10_auth_SOURCES += main.cc
+b10_auth_SOURCES += main.cc list.h
# This is a temporary workaround for #1206, where the InMemoryClient has been
# moved to an ldopened library. We could add that library to LDADD, but that
# is nonportable. This should've been moot after #1207, but there is still
diff --git a/src/bin/auth/list.h b/src/bin/auth/list.h
new file mode 100644
index 0000000..180f8bb
--- /dev/null
+++ b/src/bin/auth/list.h
@@ -0,0 +1,33 @@
+#include <datasrc/client_list.h>
+#include <datasrc/client.h>
+
+#include <dns/name.h>
+
+// Note: This file breaks almost every rule about how it should look like and
+// other formalities. However, it is only a transitional file and will be deleted
+// before the end of this branch.
+
+using namespace isc::datasrc;
+using namespace isc::dns;
+
+class SingletonList : public ClientList {
+public:
+ SingletonList(DataSourceClient& client) :
+ client_(client)
+ {}
+ virtual FindResult find(const Name& zone, bool exact, bool) const {
+ DataSourceClient::FindResult result(client_.findZone(zone));
+ switch (result.code) {
+ case result::SUCCESS:
+ return (FindResult(&client_, result.zone_finder, true));
+ case result::PARTIALMATCH:
+ if (!exact) {
+ return (FindResult(&client_, result.zone_finder, false));
+ }
+ default:
+ return (FindResult());
+ }
+ }
+private:
+ DataSourceClient& client_;
+};
More information about the bind10-changes
mailing list