zt.c revision 6333ba02a5882938f521d670adc3b8d6969441c4
/*
* Copyright (C) 2004-2007, 2011 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2002 Internet Software Consortium.
*
* 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.50 2011/03/21 23:47:21 tbox Exp $ */
/*! \file */
#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)
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];
const char *vname;
const char *sep;
int level;
return (ISC_R_SUCCESS);
return (ISC_R_SUCCESS);
if (freeze) {
if (frozen)
if (result == ISC_R_SUCCESS)
} 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
}