From: Tatuya JINMEI 神明達哉 Date: Sun, 23 Mar 2003 13:18:53 +0000 (+0000) Subject: rt #5222: useing a wrong return type for isc_file_exists(). X-Git-Tag: v9.2.3rc1~104^2~63 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=c596c075f9ba5c52909d1ca1106a0938398fe877;p=thirdparty%2Fbind9.git rt #5222: useing a wrong return type for isc_file_exists(). developer: marka reviewer: jinmei --- diff --git a/lib/dns/zone.c b/lib/dns/zone.c index 1c08672f285..f178e688ad0 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: zone.c,v 1.385 2003/02/26 23:28:59 marka Exp $ */ +/* $Id: zone.c,v 1.386 2003/03/23 13:18:53 jinmei Exp $ */ #include @@ -1006,27 +1006,17 @@ zone_load(dns_zone_t *zone, unsigned int flags) { if ((zone->type == dns_zone_slave || zone->type == dns_zone_stub) && (strcmp(zone->db_argv[0], "rbt") == 0 || strcmp(zone->db_argv[0], "rbt64") == 0)) { - if (zone->masterfile != NULL) { - result = isc_file_exists(zone->masterfile); - } else { - start_timers: + if (zone->masterfile == NULL || + !isc_file_exists(zone->masterfile)) { + if (zone->masterfile != NULL) + dns_zone_log(zone, ISC_LOG_DEBUG(1), + "no master file"); + zone->refreshtime = now; if (zone->task != NULL) zone_settimer(zone, &now); result = ISC_R_SUCCESS; goto cleanup; } - if (result == ISC_R_FILENOTFOUND) { - dns_zone_log(zone, ISC_LOG_DEBUG(1), - "no master file"); - goto start_timers; - } else if (result != ISC_R_SUCCESS) { - dns_zone_log(zone, ISC_LOG_ERROR, - "loading master file %s: %s", - zone->masterfile, - dns_result_totext(result)); - result = ISC_R_SUCCESS; - goto start_timers; - } } dns_zone_log(zone, ISC_LOG_DEBUG(1), "starting load");