zt.c revision cd01c9716ff3d995b2be1f0d053dfe81ce9335b6
/*
* Copyright (C) 1999, 2000 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
* CONSORTIUM 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.
*/
#include <config.h>
struct dns_zt {
/* Unlocked. */
unsigned int magic;
/* Locked by lock. */
};
static void
auto_detach(void *, void *);
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 **)&dummy);
return (result);
}
void
zt->references++;
}
void
zt->references--;
if (zt->references == 0)
if (destroy) {
}
}
void
&node);
if (result == ISC_R_SUCCESS) {
(void)dns_zone_print(zone);
}
}
}
return (result);
}
static isc_result_t
return (dns_zone_load(zone));
}
{
if (result == ISC_R_NOTFOUND) {
/*
* The tree is empty.
*/
}
&node);
if (result == ISC_R_SUCCESS) {
goto cleanup; /* don't break */
}
}
if (result == ISC_R_NOMORE)
return (result);
}
/***
*** Private
***/
static void
}