Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
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
0be5967e
Commit
0be5967e
authored
Jan 21, 2013
by
Marcin Siodelski
Browse files
[2314] Changes as a result of the review.
parent
3886d117
Changes
7
Hide whitespace changes
Inline
Side-by-side
src/bin/dhcp4/config_parser.cc
View file @
0be5967e
...
...
@@ -1366,10 +1366,9 @@ private:
/// @param option_space a name of the encapsulated option space.
/// @param option option instance to append sub-options to.
void
appendSubOptions
(
const
std
::
string
&
option_space
,
OptionPtr
&
option
)
{
// If invalid pointer there is nothing to do.
if
(
!
option
)
{
return
;
}
// Only non-NULL options are stored in option container.
// If this option pointer is NULL this is a serious error.
assert
(
option
);
OptionDefinitionPtr
def
;
if
(
option_space
==
"dhcp4"
&&
...
...
@@ -1398,7 +1397,7 @@ private:
assert
(
def
);
}
// We need to get option definition fo the particular option space
// We need to get option definition fo
r
the particular option space
// and code. This definition holds the information whether our
// option encapsulates any option space.
// Get the encapsulated option space name.
...
...
src/bin/dhcp6/config_parser.cc
View file @
0be5967e
...
...
@@ -1391,10 +1391,9 @@ private:
/// @param option_space a name of the encapsulated option space.
/// @param option option instance to append sub-options to.
void
appendSubOptions
(
const
std
::
string
&
option_space
,
OptionPtr
&
option
)
{
// If invalid pointer there is nothing to do.
if
(
!
option
)
{
return
;
}
// Only non-NULL options are stored in option container.
// If this option pointer is NULL this is a serious error.
assert
(
option
);
OptionDefinitionPtr
def
;
if
(
option_space
==
"dhcp6"
&&
...
...
@@ -1423,7 +1422,7 @@ private:
assert
(
def
);
}
// We need to get option definition fo the particular option space
// We need to get option definition fo
r
the particular option space
// and code. This definition holds the information whether our
// option encapsulates any option space.
// Get the encapsulated option space name.
...
...
src/lib/dhcp/option_custom.h
View file @
0be5967e
// Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2012
-2013
Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
...
...
src/lib/dhcp/option_definition.cc
View file @
0be5967e
// Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2012
-2013
Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
...
...
@@ -66,13 +66,12 @@ OptionDefinition::OptionDefinition(const std::string& name,
const
char
*
encapsulated_space
)
:
name_
(
name
),
code_
(
code
),
type_
(
OPT_UNKNOWN_TYPE
),
// Data type is held as enum value by this class.
// Use the provided option type string to get the
// corresponding enum value.
type_
(
OptionDataTypeUtil
::
getDataType
(
type
)),
array_type_
(
false
),
encapsulated_space_
(
encapsulated_space
)
{
// Data type is held as enum value by this class.
// Use the provided option type string to get the
// corresponding enum value.
type_
=
OptionDataTypeUtil
::
getDataType
(
type
);
}
OptionDefinition
::
OptionDefinition
(
const
std
::
string
&
name
,
...
...
src/lib/dhcp/option_definition.h
View file @
0be5967e
...
...
@@ -234,14 +234,14 @@ public:
/// @brief Return name of the encapsulated option space.
///
/// @return name of the encapsulated option space.
const
std
::
string
&
getEncapsulatedSpace
()
const
{
std
::
string
getEncapsulatedSpace
()
const
{
return
(
encapsulated_space_
);
}
/// @brief Return option name.
///
/// @return option name.
const
std
::
string
&
getName
()
const
{
return
(
name_
);
}
std
::
string
getName
()
const
{
return
(
name_
);
}
/// @brief Return list of record fields.
///
...
...
src/lib/dhcp/tests/libdhcp++_unittest.cc
View file @
0be5967e
// Copyright (C) 2011-201
2
Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2011-201
3
Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
...
...
src/lib/dhcp/tests/option_definition_unittest.cc
View file @
0be5967e
// Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2012
-2013
Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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