zt.c revision 7502c6600645f120434d84d0ce3df7c3585cfe43
/*
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: zt.c,v 1.39 2005/01/14 03:28:07 marka Exp $ */
#include <config.h>
#include <dns/rdataclass.h>
struct dns_zt {
/* Unlocked. */
unsigned int magic;
/* Locked by lock. */
};
static void
auto_detach(void *, void *);
static isc_result_t
static isc_result_t
static isc_result_t
return (ISC_R_NOMEMORY);
if (result != ISC_R_SUCCESS)
goto cleanup_zt;
if (result != ISC_R_SUCCESS) {
"isc_rwlock_init() failed: %s",
goto cleanup_rbt;
}
return (ISC_R_SUCCESS);
return (result);
}
if (result == ISC_R_SUCCESS)
return (result);
}
return (result);
}
{
unsigned int rbtoptions = 0;
if ((options & DNS_ZTFIND_NOEXACT) != 0)
(void **) (void*)&dummy);
return (result);
}
void
zt->references++;
}
static isc_result_t
return (dns_zone_flush(zone));
}
static void
zt->references--;
if (zt->references == 0)
if (destroy) {
if (need_flush)
}
}
void
}
void
}
return (result);
}
static isc_result_t
return (result);
}
return (result);
}
static isc_result_t
result == DNS_R_DYNAMIC)
return (result);
}
}
static isc_result_t
char zonename[DNS_NAME_FORMATSIZE];
char *journal;
const char *vname;
const char *sep;
int level;
return (ISC_R_SUCCESS);
if (freeze) {
if (frozen)
if (result == ISC_R_SUCCESS)
if (result == ISC_R_SUCCESS) {
(void)isc_file_remove(journal);
}
} else {
if (frozen) {
if (result == DNS_R_CONTINUE ||
result == DNS_R_UPTODATE)
}
}
if (result == ISC_R_SUCCESS)
{
vname = "";
sep = "";
} else {
sep = " ";
}
sizeof(classstr));
level, "%s zone '%s/%s'%s%s: %s",
return (result);
}
{
}
{
if (result == ISC_R_NOTFOUND) {
/*
* The tree is empty.
*/
}
&node);
if (result == ISC_R_SUCCESS) {
goto cleanup; /* don't break */
} else if (result != ISC_R_SUCCESS &&
tresult != ISC_R_SUCCESS)
}
}
if (result == ISC_R_NOMORE)
return (result);
}
/***
*** Private
***/
static void
}