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
e8ec4c91
Commit
e8ec4c91
authored
Aug 30, 2012
by
JINMEI Tatuya
Browse files
[2098] make sure unexpected method call doesn't happen by exception/assert
parent
b166b606
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/lib/datasrc/memory/rdata_serialization.cc
View file @
e8ec4c91
...
...
@@ -250,6 +250,7 @@ public:
virtual
void
setCompressMode
(
CompressMode
)
{}
virtual
void
writeName
(
const
LabelSequence
&
,
bool
)
{
// We don't need this version of writeName
isc_throw
(
Unexpected
,
"unexpected version of writeName is called"
);
}
// Called for each domain name in the RDATA, from the RDATA's toWire()
...
...
src/lib/dns/benchmarks/message_renderer_bench.cc
View file @
e8ec4c91
...
...
@@ -116,7 +116,11 @@ public:
virtual
void
writeName
(
const
Name
&
name
,
const
bool
=
false
)
{
name
.
toWire
(
getBuffer
());
}
virtual
void
writeName
(
const
LabelSequence
&
,
const
bool
)
{}
// unused
virtual
void
writeName
(
const
LabelSequence
&
,
const
bool
)
{
// We shouldn't use this version of writeName (and we internally
// control it, so we simply assert it here)
assert
(
false
);
}
};
void
...
...
src/lib/dns/benchmarks/oldmessagerenderer.cc
View file @
e8ec4c91
...
...
@@ -277,7 +277,9 @@ OldMessageRenderer::writeName(const Name& name, const bool compress) {
void
OldMessageRenderer
::
writeName
(
const
LabelSequence
&
,
const
bool
)
{
// we don't use this mode for the benchmark
// We shouldn't use this version of writeName (and we internally
// control it, so we simply assert it here)
assert
(
false
);
}
}
...
...
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