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
12071a88
Commit
12071a88
authored
Feb 11, 2013
by
JINMEI Tatuya
Browse files
[master] Merge branch 'trac2665'
parents
e090b84b
50e61198
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/lib/cc/data.cc
View file @
12071a88
...
...
@@ -261,7 +261,7 @@ skipChars(std::istream& in, const char* chars, int& line, int& pos) {
}
else
{
++
pos
;
}
in
.
get
();
in
.
ignore
();
c
=
in
.
peek
();
}
}
...
...
@@ -291,7 +291,7 @@ skipTo(std::istream& in, const std::string& file, int& line,
pos
=
1
;
++
line
;
}
in
.
get
();
in
.
ignore
();
++
pos
;
}
in
.
putback
(
c
);
...
...
@@ -352,7 +352,7 @@ strFromStringstream(std::istream& in, const std::string& file,
throwJSONError
(
"Bad escape"
,
file
,
line
,
pos
);
}
// drop the escaped char
in
.
get
();
in
.
ignore
();
++
pos
;
}
ss
.
put
(
c
);
...
...
@@ -490,14 +490,14 @@ fromStringstreamMap(std::istream& in, const std::string& file, int& line,
throwJSONError
(
std
::
string
(
"Unterminated map, <string> or } expected"
),
file
,
line
,
pos
);
}
else
if
(
c
==
'}'
)
{
// empty map, skip closing curly
c
=
in
.
get
();
in
.
ignore
();
}
else
{
while
(
c
!=
EOF
&&
c
!=
'}'
)
{
std
::
string
key
=
strFromStringstream
(
in
,
file
,
line
,
pos
);
skipTo
(
in
,
file
,
line
,
pos
,
":"
,
WHITESPACE
);
// skip the :
in
.
get
();
in
.
ignore
();
pos
++
;
ConstElementPtr
value
=
Element
::
fromJSON
(
in
,
file
,
line
,
pos
);
...
...
src/lib/config/tests/ccsession_unittests.cc
View file @
12071a88
...
...
@@ -343,6 +343,7 @@ TEST_F(CCSessionTest, checkCommand) {
session
.
addMessage
(
el
(
"{
\"
command
\"
:
\"
bad_command
\"
}"
),
"Spec29"
,
"*"
);
result
=
mccs
.
checkCommand
();
EXPECT_EQ
(
0
,
session
.
getMsgQueue
()
->
size
());
EXPECT_EQ
(
0
,
result
);
session
.
addMessage
(
el
(
"{
\"
command
\"
: [
\"
bad_command
\"
] }"
),
"Spec29"
,
"*"
);
...
...
@@ -627,6 +628,7 @@ TEST_F(CCSessionTest, ignoreRemoteConfigCommands) {
EXPECT_EQ
(
1
,
session
.
getMsgQueue
()
->
size
());
result
=
mccs
.
checkCommand
();
EXPECT_EQ
(
0
,
session
.
getMsgQueue
()
->
size
());
EXPECT_EQ
(
0
,
result
);
}
TEST_F
(
CCSessionTest
,
initializationFail
)
{
...
...
src/lib/dns/name.cc
View file @
12071a88
...
...
@@ -227,7 +227,6 @@ stringParse(Iterator s, Iterator send, bool downcase, Offsets& offsets,
isc_throw
(
BadLabelType
,
"invalid label type in "
<<
string
(
orig_s
,
send
));
}
state
=
ft_escape
;
// FALLTHROUGH
case
ft_escape
:
if
(
!
isdigit
(
c
&
0xff
))
{
...
...
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