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
Kea
Commits
dd4f1216
Commit
dd4f1216
authored
Sep 17, 2013
by
Mukund Sivaraman
Browse files
[3112] Avoid construction in some places
parent
9b98a012
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/dns/master_loader.cc
View file @
dd4f1216
...
...
@@ -324,7 +324,11 @@ private:
dynamic_cast
<
const
rdata
::
generic
::
SOA
&>
(
*
rdata
).
getMinimum
();
setDefaultTTL
(
RRTTL
(
ttl_val
),
true
);
current_ttl_
.
reset
(
new
RRTTL
(
*
default_ttl_
));
if
(
!
current_ttl_
)
{
current_ttl_
.
reset
(
new
RRTTL
(
*
default_ttl_
));
}
else
{
*
current_ttl_
=
*
default_ttl_
;
}
}
else
{
// On catching the exception we'll try to reach EOL again,
// so we need to unget it now.
...
...
@@ -333,7 +337,11 @@ private:
"no TTL specified; load rejected"
);
}
}
else
if
(
!
explicit_ttl
&&
default_ttl_
)
{
current_ttl_
.
reset
(
new
RRTTL
(
*
default_ttl_
));
if
(
!
current_ttl_
)
{
current_ttl_
.
reset
(
new
RRTTL
(
*
default_ttl_
));
}
else
{
*
current_ttl_
=
*
default_ttl_
;
}
}
else
if
(
!
explicit_ttl
&&
warn_rfc1035_ttl_
)
{
// Omitted (class and) TTL values are default to the last
// explicitly stated values (RFC 1035, Sec. 5.1).
...
...
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