* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: adb.c,v 1.166 2001/01/26 03:20:58 bwelling Exp $ */
+/* $Id: adb.c,v 1.167 2001/01/27 02:44:35 gson Exp $ */
/*
* Implementation notes
#define FIND_ERR_NOTFOUND 6
#define FIND_ERR_MAX 7
+static const char *errnames[] = {
+ "success",
+ "canceled",
+ "failure",
+ "nxdomain",
+ "nxrrset",
+ "unexpected",
+ "not_found"
+};
+
#define NEWERR(old, new) (ISC_MIN((old), (new)))
static isc_result_t find_err_map[FIND_ERR_MAX] = {
*/
LOCK(&adb->lock);
- dump_adb(adb, f, ISC_TRUE);
+ dump_adb(adb, f, ISC_FALSE);
UNLOCK(&adb->lock);
}
dump_ttl(f, "v6", name->expire_v6, now);
dump_ttl(f, "target", name->expire_target, now);
- fprintf(f, " [err4 %u] [err6 %u]\n",
- name->fetch_err, name->fetch6_err);
+ fprintf(f, " [v4 %s] [v6 %s]",
+ errnames[name->fetch_err],
+ errnames[name->fetch6_err]);
+
+ fprintf(f, "\n");
print_namehook_list(f, "v4", &name->v4, debug);
print_namehook_list(f, "v6", &name->v6, debug);
/*
* Unlock everything
*/
- for (i = 0 ; i < NBUCKETS ; i++)
+ for (i = 0; i < NBUCKETS; i++)
UNLOCK(&adb->entrylocks[i]);
- for (i = 0 ; i < NBUCKETS ; i++)
+ for (i = 0; i < NBUCKETS; i++)
UNLOCK(&adb->namelocks[i]);
}