mirror of
https://github.com/isc-projects/bind9.git
synced 2026-02-27 03:51:16 -05:00
wired up per-view 'servers' statement
This commit is contained in:
parent
8c7eaac6bb
commit
6d5b03be41
1 changed files with 10 additions and 5 deletions
|
|
@ -549,11 +549,16 @@ configure_view(dns_view_t *view, dns_c_ctx_t *cctx, dns_c_view_t *cview,
|
|||
*/
|
||||
{
|
||||
dns_peerlist_t *newpeers = NULL;
|
||||
if (cctx->peers != NULL) {
|
||||
dns_peerlist_attach(cctx->peers, &newpeers);
|
||||
} else {
|
||||
CHECK(dns_peerlist_new(mctx, &newpeers));
|
||||
}
|
||||
|
||||
result = ISC_R_NOTFOUND;
|
||||
if (cview != NULL)
|
||||
result = dns_c_view_getpeerlist(cview, &newpeers);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
result = dns_c_ctx_getpeerlist(cctx, &newpeers);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
result = dns_peerlist_new(mctx, &newpeers);
|
||||
CHECK(result);
|
||||
|
||||
dns_peerlist_detach(&view->peers);
|
||||
view->peers = newpeers; /* Transfer ownership. */
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue