deal with the default view

This commit is contained in:
Andreas Gustafsson 2000-05-25 22:10:29 +00:00
parent c885fad9b8
commit 8c7eaac6bb
2 changed files with 20 additions and 16 deletions

View file

@ -144,14 +144,16 @@ dns_tsigkeyring_fromconfig(dns_c_view_t *confview, dns_c_ctx_t *confctx,
if (result != ISC_R_SUCCESS)
goto failure;
keylist = NULL;
result = dns_c_view_getkeydefs(confview, &keylist);
if (result == ISC_R_SUCCESS)
result = add_initial_keys(keylist, ring, mctx);
else if (result == ISC_R_NOTFOUND)
result = ISC_R_SUCCESS;
if (result != ISC_R_SUCCESS)
goto failure;
if (confview != NULL) {
keylist = NULL;
result = dns_c_view_getkeydefs(confview, &keylist);
if (result == ISC_R_SUCCESS)
result = add_initial_keys(keylist, ring, mctx);
else if (result == ISC_R_NOTFOUND)
result = ISC_R_SUCCESS;
if (result != ISC_R_SUCCESS)
goto failure;
}
*ringp = ring;
return (ISC_R_SUCCESS);

View file

@ -144,14 +144,16 @@ dns_tsigkeyring_fromconfig(dns_c_view_t *confview, dns_c_ctx_t *confctx,
if (result != ISC_R_SUCCESS)
goto failure;
keylist = NULL;
result = dns_c_view_getkeydefs(confview, &keylist);
if (result == ISC_R_SUCCESS)
result = add_initial_keys(keylist, ring, mctx);
else if (result == ISC_R_NOTFOUND)
result = ISC_R_SUCCESS;
if (result != ISC_R_SUCCESS)
goto failure;
if (confview != NULL) {
keylist = NULL;
result = dns_c_view_getkeydefs(confview, &keylist);
if (result == ISC_R_SUCCESS)
result = add_initial_keys(keylist, ring, mctx);
else if (result == ISC_R_NOTFOUND)
result = ISC_R_SUCCESS;
if (result != ISC_R_SUCCESS)
goto failure;
}
*ringp = ring;
return (ISC_R_SUCCESS);