2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

make lameness work, now. Grr.

This commit is contained in:
Michael Graff
1999-10-19 21:28:09 +00:00
parent f36a81c884
commit f00d96a15c
3 changed files with 47 additions and 8 deletions

View File

@@ -92,6 +92,8 @@ main(int argc, char **argv)
dns_view_t *view;
dns_adb_t *adb;
dns_adbhandle_t *handle;
dns_adbaddrinfo_t *ai;
isc_stdtime_t now;
(void)argc;
(void)argv;
@@ -100,6 +102,9 @@ main(int argc, char **argv)
result = isc_app_start();
check_result(result, "isc_app_start()");
result = isc_stdtime_get(&now);
check_result(result, "isc_stdtime_get()");
/*
* EVERYTHING needs a memory context.
*/
@@ -194,6 +199,30 @@ main(int argc, char **argv)
dns_adb_dump(adb, stderr);
dns_adb_dumphandle(adb, handle, stderr);
/*
* Mark one entry as lame, then look this name up again.
*/
ai = ISC_LIST_HEAD(handle->list);
INSIST(ai != NULL);
ai = ISC_LIST_NEXT(ai, link);
INSIST(ai != NULL);
result = dns_adb_marklame(adb, ai, &name1, now + 10 * 60);
check_result(result, "dns_adb_marklame()");
dns_adb_done(adb, &handle);
/*
* look it up again
*/
result = dns_adb_lookup(adb, t2, lookup_callback, &name1,
&name1, &name1, &handle);
check_result(result, "dns_adb_lookup name1");
check_result(handle->result, "handle->result");
dns_adb_dump(adb, stderr);
dns_adb_dumphandle(adb, handle, stderr);
/*
* delete one of the names, and kill the adb
*/
@@ -201,7 +230,6 @@ main(int argc, char **argv)
check_result(result, "dns_adb_deletename name2");
dns_adb_dump(adb, stderr);
dns_adb_dumphandle(adb, handle, stderr);
dns_adb_done(adb, &handle);
isc_task_detach(&t1);