rename qpdb to qpcache
move qpdb.c to qpcache.c and rename the "qp" database implementation to "qpcache", in order to make it more clearly distinguishable from "qpzone".
This commit is contained in:
@@ -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*],[],
|
||||
|
||||
@@ -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 \
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
#include <dns/zonekey.h>
|
||||
|
||||
#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;
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user