summaryrefslogtreecommitdiffstats
path: root/lib/libc/asr/asr_debug.c
diff options
context:
space:
mode:
authoreric <eric@openbsd.org>2013-05-27 17:31:01 +0000
committereric <eric@openbsd.org>2013-05-27 17:31:01 +0000
commit1ed934d0d08bf9c3f460e8740d169e7606f8702f (patch)
tree7a998af1cd409090f648bb8eda3c9a42717ba397 /lib/libc/asr/asr_debug.c
parentNo need to build asr files anymore. (diff)
downloadwireguard-openbsd-1ed934d0d08bf9c3f460e8740d169e7606f8702f.tar.xz
wireguard-openbsd-1ed934d0d08bf9c3f460e8740d169e7606f8702f.zip
Add minimal support for _res setup and update.
Change res_init() to initialize the _res structure on first call, and udpate the global async context if changes were made by the user. All resolver functions now call res_init() internally. fixes issue spotted by otto@
Diffstat (limited to 'lib/libc/asr/asr_debug.c')
-rw-r--r--lib/libc/asr/asr_debug.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/lib/libc/asr/asr_debug.c b/lib/libc/asr/asr_debug.c
index 468c197134e..8cc54e2062f 100644
--- a/lib/libc/asr/asr_debug.c
+++ b/lib/libc/asr/asr_debug.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: asr_debug.c,v 1.12 2013/04/09 06:42:17 otto Exp $ */
+/* $OpenBSD: asr_debug.c,v 1.13 2013/05/27 17:31:01 eric Exp $ */
/*
* Copyright (c) 2012 Eric Faurot <eric@openbsd.org>
*
@@ -302,22 +302,7 @@ asr_dump_config(FILE *f, struct asr *a)
fprintf(f, " %s\n", print_sockaddr(ac->ac_ns[i], buf,
sizeof buf));
fprintf(f, "HOSTFILE %s\n", ac->ac_hostfile);
- fprintf(f, "LOOKUP");
- for (i = 0; i < ac->ac_dbcount; i++) {
- switch (ac->ac_db[i]) {
- case ASR_DB_FILE:
- fprintf(f, " file");
- break;
- case ASR_DB_DNS:
- fprintf(f, " dns");
- break;
- case ASR_DB_YP:
- fprintf(f, " yp");
- break;
- default:
- fprintf(f, " ?%i", ac->ac_db[i]);
- }
- }
+ fprintf(f, "LOOKUP %s", ac->ac_db);
fprintf(f, "\n------------------------------------\n");
}