Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
BIND
Commits
a5af8127
Commit
a5af8127
authored
Nov 28, 2000
by
Mark Andrews
Browse files
add support for enabling library logging.
add missing ISC_LINK_INIT()
parent
a7e4b894
Changes
1
Hide whitespace changes
Inline
Side-by-side
bin/tests/db_test.c
View file @
a5af8127
...
...
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: db_test.c,v 1.5
4
2000/1
0/17 07:22:25
marka Exp $ */
/* $Id: db_test.c,v 1.5
5
2000/1
1/28 03:34:10
marka Exp $ */
/*
* Principal Author: Bob Halley
...
...
@@ -26,6 +26,7 @@
#include
<stdlib.h>
#include
<isc/commandline.h>
#include
<isc/log.h>
#include
<isc/mem.h>
#include
<isc/time.h>
#include
<isc/string.h>
...
...
@@ -35,6 +36,7 @@
#include
<dns/dbiterator.h>
#include
<dns/dbtable.h>
#include
<dns/fixedname.h>
#include
<dns/log.h>
#include
<dns/rdataset.h>
#include
<dns/rdatasetiter.h>
#include
<dns/result.h>
...
...
@@ -262,6 +264,7 @@ load(const char *filename, const char *origintext, isc_boolean_t cache) {
dbi
->
iversion
=
NULL
;
dbi
->
pause_every
=
pause_every
;
dbi
->
ascending
=
ascending
;
ISC_LINK_INIT
(
dbi
,
link
);
len
=
strlen
(
origintext
);
isc_buffer_init
(
&
source
,
origintext
,
len
);
...
...
@@ -374,6 +377,7 @@ main(int argc, char *argv[]) {
size_t
memory_quota
=
0
;
dns_trust_t
trust
=
0
;
unsigned
int
addopts
;
isc_log_t
*
lctx
=
NULL
;
dns_result_register
();
...
...
@@ -381,8 +385,10 @@ main(int argc, char *argv[]) {
RUNTIME_CHECK
(
dns_dbtable_create
(
mctx
,
dns_rdataclass_in
,
&
dbtable
)
==
ISC_R_SUCCESS
);
strcpy
(
dbtype
,
"rbt"
);
while
((
ch
=
isc_commandline_parse
(
argc
,
argv
,
"c:d:t:z:P:Q:gpqvT"
))
while
((
ch
=
isc_commandline_parse
(
argc
,
argv
,
"c:d:t:z:P:Q:g
l
pqvT"
))
!=
-
1
)
{
switch
(
ch
)
{
case
'c'
:
...
...
@@ -398,6 +404,13 @@ main(int argc, char *argv[]) {
case
'g'
:
options
|=
(
DNS_DBFIND_GLUEOK
|
DNS_DBFIND_VALIDATEGLUE
);
break
;
case
'l'
:
RUNTIME_CHECK
(
isc_log_create
(
mctx
,
&
lctx
,
NULL
)
==
ISC_R_SUCCESS
);
isc_log_setcontext
(
lctx
);
dns_log_init
(
lctx
);
dns_log_setcontext
(
lctx
);
break
;
case
'q'
:
quiet
=
ISC_TRUE
;
verbose
=
ISC_FALSE
;
...
...
@@ -923,6 +936,9 @@ main(int argc, char *argv[]) {
dns_dbtable_detach
(
&
dbtable
);
if
(
lctx
!=
NULL
)
isc_log_destroy
(
&
lctx
);
if
(
!
quiet
)
isc_mem_stats
(
mctx
,
stdout
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment