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
687b7ef9
Commit
687b7ef9
authored
Sep 01, 2001
by
Andreas Gustafsson
Browse files
handle max-journal-size more like other options
parent
847ed3fc
Changes
2
Hide whitespace changes
Inline
Side-by-side
bin/named/config.c
View file @
687b7ef9
...
...
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: config.c,v 1.1
2
2001/0
8/30 05:52:08 marka
Exp $ */
/* $Id: config.c,v 1.1
3
2001/0
9/01 01:43:23 gson
Exp $ */
#include
<config.h>
...
...
@@ -143,6 +143,7 @@ options {\n\
min-refresh-time 300;
\n
\
sig-validity-interval 30; /* days */
\n
\
zone-statistics false;
\n
\
max-journal-size unlimited;
\n
\
};"
;
isc_result_t
...
...
bin/named/zoneconf.c
View file @
687b7ef9
...
...
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: zoneconf.c,v 1.
8
9 2001/09/01 01:
1
3:
39
gson Exp $ */
/* $Id: zoneconf.c,v 1.9
0
2001/09/01 01:
4
3:
24
gson Exp $ */
#include
<config.h>
...
...
@@ -479,30 +479,26 @@ ns_zone_configure(cfg_obj_t *config, cfg_obj_t *vconfig, cfg_obj_t *zconfig,
obj
=
NULL
;
result
=
ns_config_get
(
maps
,
"max-journal-size"
,
&
obj
);
if
(
result
==
ISC_R_SUCCESS
)
{
dns_zone_setjournalsize
(
zone
,
-
1
);
if
(
cfg_obj_isstring
(
obj
))
{
const
char
*
str
=
cfg_obj_asstring
(
obj
);
if
(
strcasecmp
(
str
,
"unlimited"
)
==
0
)
journal_size
=
ISC_UINT32_MAX
/
2
;
else
journal_size
=
-
1
;
}
else
{
isc_resourcevalue_t
value
;
value
=
cfg_obj_asuint64
(
obj
);
if
(
value
>
ISC_UINT32_MAX
/
2
)
{
cfg_obj_log
(
obj
,
ns_g_lctx
,
ISC_LOG_ERROR
,
"'max-journal-size "
"%"
ISC_PRINT_QUADFORMAT
"d' is too large"
,
value
);
RETERR
(
ISC_R_RANGE
);
}
journal_size
=
(
isc_uint32_t
)
value
;
INSIST
(
result
==
ISC_R_SUCCESS
);
dns_zone_setjournalsize
(
zone
,
-
1
);
if
(
cfg_obj_isstring
(
obj
))
{
const
char
*
str
=
cfg_obj_asstring
(
obj
);
INSIST
(
strcasecmp
(
str
,
"unlimited"
)
==
0
);
journal_size
=
ISC_UINT32_MAX
/
2
;
}
else
{
isc_resourcevalue_t
value
;
value
=
cfg_obj_asuint64
(
obj
);
if
(
value
>
ISC_UINT32_MAX
/
2
)
{
cfg_obj_log
(
obj
,
ns_g_lctx
,
ISC_LOG_ERROR
,
"'max-journal-size "
"%"
ISC_PRINT_QUADFORMAT
"d' is too large"
,
value
);
RETERR
(
ISC_R_RANGE
);
}
}
else
journal_size
=
-
1
;
dns_zone_setjournalsize
(
zone
,
journal_size
);
journal_size
=
(
isc_uint32_t
)
value
;
}
dns_zone_setjournalsize
(
zone
,
journal_size
);
}
/*
...
...
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