diff --git a/configure.ac b/configure.ac index 070bccf102..1c2e1299c9 100644 --- a/configure.ac +++ b/configure.ac @@ -1585,13 +1585,13 @@ AS_CASE([$with_zonedb], AC_DEFINE_UNQUOTED([ZONEDB_DEFAULT], ["$zonedb"], [Default zone database type]) # -# Which should be the default zone database, RBTDB or QPDB (based on dns_qp)? +# Which should be the default zone database, RBTDB or QPCACHE? # [pairwise: --with-cachedb=qp, --with-cachedb=rbt] # AC_ARG_WITH([cachedb], - [AS_HELP_STRING([--with-cachedb=detect],[specify default cache database type (default is "qp")])], + [AS_HELP_STRING([--with-cachedb=detect],[specify default cache database type (default is "qpcache")])], [],[with_cachedb=qp]) -cachedb="qp" +cachedb="qpcache" AS_CASE([$with_cachedb], [RBT*|rbt*],[cachedb="rbt"], [QP*|qp*],[], diff --git a/lib/dns/Makefile.am b/lib/dns/Makefile.am index abf6e2bc5c..2e6f8d6961 100644 --- a/lib/dns/Makefile.am +++ b/lib/dns/Makefile.am @@ -223,8 +223,8 @@ libdns_la_SOURCES = \ rbt-zonedb.c \ rbtdb.c \ rbtdb_p.h \ - qpdb_p.h \ - qpdb.c \ + qpcache.c \ + qpcache_p.h \ rcode.c \ rdata.c \ rdatalist.c \ diff --git a/lib/dns/cache.c b/lib/dns/cache.c index 902ae732e9..32853be8d3 100644 --- a/lib/dns/cache.c +++ b/lib/dns/cache.c @@ -91,9 +91,9 @@ cache_create_db(dns_cache_t *cache, dns_db_t **db) { char *argv[1] = { 0 }; /* - * For databases of type "qp" (which is the only cache - * implementation currently in existence) we pass hmctx to - * dns_db_create() via argv[0]. + * For databases of type "qpcache" or "rbt" (which are the + * only cache implementations currently in existence) we pass + * hmctx to dns_db_create() via argv[0]. */ argv[0] = (char *)cache->hmctx; result = dns_db_create(cache->mctx, CACHEDB_DEFAULT, dns_rootname, diff --git a/lib/dns/db.c b/lib/dns/db.c index 98e2c3f8f9..a5612e49fd 100644 --- a/lib/dns/db.c +++ b/lib/dns/db.c @@ -62,7 +62,7 @@ struct dns_dbimplementation { */ #include "db_p.h" -#include "qpdb_p.h" +#include "qpcache_p.h" #include "qpzone_p.h" #include "rbtdb_p.h" @@ -89,8 +89,8 @@ initialize(void) { }; qpimp = (dns_dbimplementation_t){ - .name = "qp", - .create = dns__qpdb_create, + .name = "qpcache", + .create = dns__qpcache_create, .link = ISC_LINK_INITIALIZER, }; diff --git a/lib/dns/qpdb.c b/lib/dns/qpcache.c similarity index 99% rename from lib/dns/qpdb.c rename to lib/dns/qpcache.c index b5427c2ab6..f9e2d379a2 100644 --- a/lib/dns/qpdb.c +++ b/lib/dns/qpcache.c @@ -62,7 +62,7 @@ #include #include "db_p.h" -#include "qpdb_p.h" +#include "qpcache_p.h" #define CHECK(op) \ do { \ @@ -3862,9 +3862,10 @@ unlocknode(dns_db_t *db, dns_dbnode_t *node, isc_rwlocktype_t type) { } isc_result_t -dns__qpdb_create(isc_mem_t *mctx, const dns_name_t *origin, dns_dbtype_t type, - dns_rdataclass_t rdclass, unsigned int argc, char *argv[], - void *driverarg ISC_ATTR_UNUSED, dns_db_t **dbp) { +dns__qpcache_create(isc_mem_t *mctx, const dns_name_t *origin, + dns_dbtype_t type, dns_rdataclass_t rdclass, + unsigned int argc, char *argv[], + void *driverarg ISC_ATTR_UNUSED, dns_db_t **dbp) { dns_qpdb_t *qpdb = NULL; isc_result_t result; isc_mem_t *hmctx = mctx; diff --git a/lib/dns/qpdb_p.h b/lib/dns/qpcache_p.h similarity index 80% rename from lib/dns/qpdb_p.h rename to lib/dns/qpcache_p.h index b00b712ce3..5992ba77c2 100644 --- a/lib/dns/qpdb_p.h +++ b/lib/dns/qpcache_p.h @@ -34,11 +34,11 @@ ISC_LANG_BEGINDECLS isc_result_t -dns__qpdb_create(isc_mem_t *mctx, const dns_name_t *base, dns_dbtype_t type, - dns_rdataclass_t rdclass, unsigned int argc, char *argv[], - void *driverarg, dns_db_t **dbp); +dns__qpcache_create(isc_mem_t *mctx, const dns_name_t *base, dns_dbtype_t type, + dns_rdataclass_t rdclass, unsigned int argc, char *argv[], + void *driverarg, dns_db_t **dbp); /*%< - * Create a new database of type "qp". Called via dns_db_create(); + * Create a new database of type "qpcache". Called via dns_db_create(); * see documentation for that function for more details. * * If argv[0] is set, it points to a valid memory context to be used for diff --git a/tests/dns/qpdb_test.c b/tests/dns/qpdb_test.c index e7a6a296b0..d96a59080c 100644 --- a/tests/dns/qpdb_test.c +++ b/tests/dns/qpdb_test.c @@ -36,7 +36,7 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wshadow" #undef CHECK -#include "qpdb.c" +#include "qpcache.c" #pragma GCC diagnostic pop #undef CHECK diff --git a/tests/dns/qpzone_test.c b/tests/dns/qpzone_test.c index 707bb78e88..afd4f4285a 100644 --- a/tests/dns/qpzone_test.c +++ b/tests/dns/qpzone_test.c @@ -37,9 +37,7 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wshadow" #undef CHECK -#include "db_p.h" #include "qpzone.c" -#include "qpzone_p.h" #pragma GCC diagnostic pop #undef CHECK