2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

Perform explict attach of db to xfr stucture. Calling function to detach.

This commit is contained in:
Mark Andrews
1999-10-25 12:18:43 +00:00
parent 76771c089c
commit 4c494e429c
2 changed files with 16 additions and 4 deletions

View File

@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: xfrin.c,v 1.15 1999/10/14 02:24:17 gson Exp $ */
/* $Id: xfrin.c,v 1.16 1999/10/25 12:18:43 marka Exp $ */
#include <config.h>
@@ -497,9 +497,13 @@ ns_xfrin_start(dns_zone_t *zone, isc_sockaddr_t *master) {
master, key, &xfr));
xfrin_start(xfr);
if (db != NULL)
dns_db_detach(&db);
return;
failure:
if (db != NULL)
dns_db_detach(&db);
printf("zone transfer setup failed\n");
return;
}
@@ -567,7 +571,9 @@ xfrin_create(isc_mem_t *mctx,
/* tcpmsg */
xfr->tcpmsg_valid = ISC_FALSE;
xfr->db = db;
xfr->db = NULL;
if (db != NULL)
dns_db_attach(db, &xfr->db);
xfr->ver = NULL;
dns_diff_init(xfr->mctx, &xfr->diff);
xfr->difflen = 0;

View File

@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: xfrin.c,v 1.15 1999/10/14 02:24:17 gson Exp $ */
/* $Id: xfrin.c,v 1.16 1999/10/25 12:18:43 marka Exp $ */
#include <config.h>
@@ -497,9 +497,13 @@ ns_xfrin_start(dns_zone_t *zone, isc_sockaddr_t *master) {
master, key, &xfr));
xfrin_start(xfr);
if (db != NULL)
dns_db_detach(&db);
return;
failure:
if (db != NULL)
dns_db_detach(&db);
printf("zone transfer setup failed\n");
return;
}
@@ -567,7 +571,9 @@ xfrin_create(isc_mem_t *mctx,
/* tcpmsg */
xfr->tcpmsg_valid = ISC_FALSE;
xfr->db = db;
xfr->db = NULL;
if (db != NULL)
dns_db_attach(db, &xfr->db);
xfr->ver = NULL;
dns_diff_init(xfr->mctx, &xfr->diff);
xfr->difflen = 0;