2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 05:28:00 +00:00

1636. [bug] The dump done callback could get ISC_R_SUCCESS even if

a error had occured.  The database version no longer
                        matched the version of the database that was dumped.
This commit is contained in:
Mark Andrews 2004-05-14 00:55:57 +00:00
parent 97f1498dda
commit 4e681da26d
2 changed files with 12 additions and 6 deletions

View File

@ -1,3 +1,7 @@
1636. [bug] The dump done callback could get ISC_R_SUCCESS even if
a error had occured. The database version no longer
matched the version of the database that was dumped.
1635. [bug] Memory leak on error in query_addds(). 1635. [bug] Memory leak on error in query_addds().
1634. [placeholder] rt11208 1634. [placeholder] rt11208

View File

@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: masterdump.c,v 1.73 2004/03/05 05:09:21 marka Exp $ */ /* $Id: masterdump.c,v 1.74 2004/05/14 00:55:57 marka Exp $ */
#include <config.h> #include <config.h>
@ -979,6 +979,7 @@ closeandrename(FILE *f, isc_result_t result, const char *temp, const char *file)
static void static void
dump_quantum(isc_task_t *task, isc_event_t *event) { dump_quantum(isc_task_t *task, isc_event_t *event) {
isc_result_t result; isc_result_t result;
isc_result_t tresult;
dns_dumpctx_t *dctx; dns_dumpctx_t *dctx;
REQUIRE(event != NULL); REQUIRE(event != NULL);
@ -994,11 +995,12 @@ dump_quantum(isc_task_t *task, isc_event_t *event) {
return; return;
} }
if (dctx->file != NULL) if (dctx->file != NULL) {
result = closeandrename(dctx->f, result, tresult = closeandrename(dctx->f, result,
dctx->tmpfile, dctx->file); dctx->tmpfile, dctx->file);
if (dctx->version != NULL) if (tresult != ISC_R_SUCCESS && result == ISC_R_SUCCESS)
dns_db_closeversion(dctx->db, &dctx->version, ISC_FALSE); result = tresult;
}
(dctx->done)(dctx->done_arg, result); (dctx->done)(dctx->done_arg, result);
isc_event_free(&event); isc_event_free(&event);
dns_dumpctx_detach(&dctx); dns_dumpctx_detach(&dctx);