/*
* Copyright (C) 1999-2001, 2004, 2005, 2007, 2013, 2016 Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/*
* $Id: dbtable.c,v 1.33 2007/06/19 23:47:16 tbox Exp $
*/
/*! \file
* \author
* Principal Author: DCL
*/
#include <config.h>
struct dns_dbtable {
/* Unlocked. */
unsigned int magic;
/* Locked by lock. */
unsigned int references;
/* Locked by tree_lock. */
};
static void
dns_db_detach(&db);
}
{
return (ISC_R_NOMEMORY);
if (result != ISC_R_SUCCESS)
goto clean1;
if (result != ISC_R_SUCCESS)
goto clean2;
if (result != ISC_R_SUCCESS)
goto clean3;
return (ISC_R_SUCCESS);
return (result);
}
static inline void
/*
* Caller must ensure that it is safe to call.
*/
}
void
source->references++;
}
void
dbtable->references--;
if (dbtable->references == 0)
if (free_dbtable)
}
return (result);
}
void
/*
* There is a requirement that the association of name with db
* be verified. With the current rbt.c this is expensive to do,
* because effectively two find operations are being done, but
* deletion is relatively infrequent.
* XXXDCL ... this could be cheaper now with dns_rbt_deletenode.
*/
(void **) (void *)&stored_data);
if (result == ISC_R_SUCCESS) {
}
}
void
}
void
}
void
}
{
unsigned int rbtoptions = 0;
if ((options & DNS_DBTABLEFIND_NOEXACT) != 0)
(void **) (void *)&stored_data);
} else
return (result);
}