zt.c revision 78838d3e0cd62423c23de5503910e01884d2104b
/*
* 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.
*/
/* $Id: zt.c,v 1.27 2000/12/11 19:24:30 bwelling Exp $ */
#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++;
}
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 (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
}