// Fetch the zone
zone_ctx* zone = find_zone(z);
if (!zone)
- return ;
+ return;
+
+ // Detach the XFR object
+ if (zone->xfrin)
+ dns_xfrin_detach(&zone->xfrin);
// Release the zone from the manager
dns_zonemgr_releasezone(ctx.zonemgr, zone->zone);
zone_done(zone);
}
-static int do_transfer(dns_zone_t* zone, uint32_t serial) {
- dns_xfrin_t* xfrin = NULL;
+
+static int do_transfer(zone_ctx* zone, uint32_t serial) {
dns_rdatatype_t xfrtype;
int r;
}
// Require at least 10 kBit/s to be transmitted over 5 minutes
- dns_zone_setminxfrratein(zone, 10240, 300);
+ dns_zone_setminxfrratein(zone->zone, 10240, 300);
- dns_xfrin_create(zone, xfrtype, &ctx.primary_address, &ctx.source_address, NULL,
- DNS_TRANSPORT_NONE, ctx.transport, ctx.tlsctx_cache, ctx.memctx, &xfrin);
+ dns_xfrin_create(zone->zone, xfrtype, &ctx.primary_address, &ctx.source_address, NULL,
+ DNS_TRANSPORT_NONE, ctx.transport, ctx.tlsctx_cache, ctx.memctx, &zone->xfrin);
// Start the transfer
- r = dns_xfrin_start(xfrin, transfer_done);
+ r = dns_xfrin_start(zone->xfrin, transfer_done);
switch (r) {
case ISC_R_SUCCESS:
break;
return r;
ERROR:
- zone_done(zone);
+ zone_done(zone->zone);
return r;
}
}
// Initiate the transfer
- return do_transfer(zone->zone, serial);
+ return do_transfer(zone, serial);
ERROR:
// Destroy the zone