Commit 7baa39fc authored by Evan Hunt's avatar Evan Hunt

[master] it's okay if dns_db_setgluecachestats() returns ISC_R_NOTIMPLEMENTED

parent 4101e6d3
......@@ -599,17 +599,17 @@ static dns_dbmethods_t sampledb_methods = {
resigned,
isdnssec,
getrrsetstats,
NULL,
NULL,
NULL, /* rpz_attach */
NULL, /* rpz_ready */
findnodeext,
findext,
setcachestats,
hashsize,
NULL,
NULL,
NULL,
NULL,
NULL
NULL, /* nodefullname */
NULL, /* getsize */
NULL, /* setservestalettl */
NULL, /* getservestalettl */
NULL /* setgluecachestats */
};
/* Auxiliary driver functions. */
......
......@@ -1153,8 +1153,9 @@ dns_db_setgluecachestats(dns_db_t *db, isc_stats_t *stats) {
REQUIRE(dns_db_iszone(db));
REQUIRE(stats != NULL);
if (db->methods->setgluecachestats != NULL)
if (db->methods->setgluecachestats != NULL) {
return ((db->methods->setgluecachestats)(db, stats));
}
return (ISC_R_NOTIMPLEMENTED);
}
......@@ -8278,24 +8278,24 @@ static dns_dbmethods_t zone_methods = {
overmem,
settask,
getoriginnode,
NULL,
NULL, /* transfernode */
getnsec3parameters,
findnsec3node,
setsigningtime,
getsigningtime,
resigned,
isdnssec,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL, /* getrrsetstats */
NULL, /* rpz_attach */
NULL, /* rpz_ready */
NULL, /* findnodeext */
NULL, /* findext */
NULL, /* setcachestats */
hashsize,
nodefullname,
getsize,
NULL,
NULL,
NULL, /* setservestalettl */
NULL, /* getservestalettl */
setgluecachestats
};
......@@ -8304,7 +8304,7 @@ static dns_dbmethods_t cache_methods = {
detach,
beginload,
endload,
NULL,
NULL, /* serialize */
dump,
currentversion,
newversion,
......@@ -8329,22 +8329,22 @@ static dns_dbmethods_t cache_methods = {
overmem,
settask,
getoriginnode,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL, /* transfernode */
NULL, /* getnsec3parameters */
NULL, /* findnsec3node */
NULL, /* setsigningtime */
NULL, /* getsigningtime */
NULL, /* resigned */
isdnssec,
getrrsetstats,
NULL,
NULL,
NULL,
NULL,
NULL, /* rpz_attach */
NULL, /* rpz_ready */
NULL, /* findnodeext */
NULL, /* findext */
setcachestats,
hashsize,
nodefullname,
NULL,
NULL, /* getsize */
setservestalettl,
getservestalettl,
NULL
......
......@@ -1252,14 +1252,14 @@ static dns_dbmethods_t sdb_methods = {
detach,
beginload,
endload,
NULL,
NULL, /* serialize */
dump,
currentversion,
newversion,
attachversion,
closeversion,
NULL,
NULL,
NULL, /* findnode */
NULL, /* find */
findzonecut,
attachnode,
detachnode,
......
......@@ -1288,7 +1288,7 @@ static dns_dbmethods_t sdlzdb_methods = {
detach,
beginload,
endload,
NULL,
NULL, /* serialize */
dump,
currentversion,
newversion,
......
......@@ -2101,8 +2101,12 @@ zone_load(dns_zone_t *zone, unsigned int flags, isc_boolean_t locked) {
if (zone->type == dns_zone_master || zone->type == dns_zone_slave) {
result = dns_db_setgluecachestats(db, zone->gluecachestats);
if (result != ISC_R_SUCCESS)
if (result == ISC_R_NOTIMPLEMENTED) {
result = ISC_R_SUCCESS;
}
if (result != ISC_R_SUCCESS) {
goto cleanup;
}
}
if (! dns_db_ispersistent(db)) {
......@@ -14671,8 +14675,9 @@ receive_secure_db(isc_task_t *task, isc_event_t *event) {
goto failure;
result = dns_db_setgluecachestats(db, zone->gluecachestats);
if (result != ISC_R_SUCCESS)
if (result != ISC_R_SUCCESS && result != ISC_R_NOTIMPLEMENTED) {
goto failure;
}
result = dns_db_newversion(db, &version);
if (result != ISC_R_SUCCESS)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment