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
5b018cab
Commit
5b018cab
authored
Jan 24, 2017
by
Francis Dupont
Browse files
[master] spelling
parent
50bcba05
Changes
15
Hide whitespace changes
Inline
Side-by-side
src/lib/log/message_initializer.h
View file @
5b018cab
// Copyright (C) 2011-2015 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2011-2015
,2017
Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
...
...
@@ -59,7 +59,7 @@ typedef boost::shared_ptr<LoggerDuplicatesList> LoggerDuplicatesListPtr;
/// To avoid static initialization fiasco problems, the containers shared by
/// all instances of this class are dynamically allocated on first use, and
/// held in the smart pointers which are de-allocated only when all instances
/// of the class are destruct
r
ed. After the object has been created with the
/// of the class are destructed. After the object has been created with the
/// constructor, the \c MessageInitializer::loadDictionary static function is
/// called to populate the messages defined in various instances of the
/// \c MessageInitializer class to the global dictionary.
...
...
src/lib/process/d_cfg_mgr.h
View file @
5b018cab
// Copyright (C) 2013-201
6
Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2013-201
7
Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
...
...
@@ -363,7 +363,7 @@ protected:
/// @return Returns a DCfgContextBasePtr to the new context instance.
virtual
DCfgContextBasePtr
createNewContext
()
=
0
;
/// @brief Replaces existing context with a new, em
t
py context.
/// @brief Replaces existing context with a new, emp
t
y context.
void
resetContext
();
/// @brief Update the current context.
...
...
src/lib/process/d_controller.h
View file @
5b018cab
// Copyright (C) 2013-2015 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2013-2015
,2017
Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
...
...
@@ -179,7 +179,7 @@ public:
///
/// The method extracts the set of configuration elements for the
/// module-name which matches the controller's app_name_ and passes that
/// set into @c u
d
pateConfig().
/// set into @c up
d
ateConfig().
///
/// The file may contain an arbitrary number of other modules.
///
...
...
src/lib/process/io_service_signal.h
View file @
5b018cab
// Copyright (C) 2014-201
6
Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2014-201
7
Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
...
...
@@ -68,7 +68,7 @@ typedef boost::function<void(IOSignalId sequence_id)> IOSignalHandler;
/// pointer to instigating IOSignal from which the value of OS signal (i.e.
/// SIGINT, SIGUSR1...) can be obtained. Note that calling popSignal()
/// removes the IOSignalPtr from the queue, which should reduce its
/// reference count to zero upon exiting the handler (unless a delibrate
/// reference count to zero upon exiting the handler (unless a delib
e
rate
/// copy of it is made).
///
/// A typical IOSignalHandler might be structured as follows:
...
...
@@ -190,7 +190,7 @@ typedef std::map<IOSignalId, IOSignalPtr> IOSignalMap;
/// This class is designed specifically to make managing them painless.
/// It maintains an internal map of IOSignals keyed by sequence_id. When a
/// signal is created via the pushSignal() method it is added to the map. When
/// a signal is retrev
i
ed via the popSignal() method it is removed from the map.
/// a signal is retr
i
eved via the popSignal() method it is removed from the map.
class
IOSignalQueue
{
public:
/// @brief Constructor
...
...
@@ -211,7 +211,7 @@ public:
/// control to IOService::run()).
///
/// @param signum OS signal value of the signal to propagate
/// @param handler IOSignalHandler to invoke when the signal is delivere
r
d.
/// @param handler IOSignalHandler to invoke when the signal is delivered.
///
/// @return The sequence_id of the newly created signal.
///
...
...
@@ -231,7 +231,7 @@ public:
///
/// @throw IOSignalError if there is no matching IOSignal in the map for
/// the given sequence_id. Other than by doubling popping, this should be
/// very unlik
l
ey.
/// very unlike
l
y.
IOSignalPtr
popSignal
(
IOSignalId
sequence_id
);
/// @brief Erases the contents of the queue.
...
...
src/lib/stats/stats_mgr.cc
View file @
5b018cab
// Copyright (C) 2015 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2015
,2017
Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
...
...
@@ -59,19 +59,19 @@ void StatsMgr::addValue(const std::string& name, const std::string& value) {
ObservationPtr
StatsMgr
::
getObservation
(
const
std
::
string
&
name
)
const
{
/// @todo: Implement contexts.
// Currently we keep everyting in a global context.
// Currently we keep everyt
h
ing in a global context.
return
(
global_
->
get
(
name
));
}
void
StatsMgr
::
addObservation
(
const
ObservationPtr
&
stat
)
{
/// @todo: Implement contexts.
// Currently we keep everyting in a global context.
// Currently we keep everyt
h
ing in a global context.
return
(
global_
->
add
(
stat
));
}
bool
StatsMgr
::
deleteObservation
(
const
std
::
string
&
name
)
{
/// @todo: Implement contexts.
// Currently we keep everyting in a global context.
// Currently we keep everyt
h
ing in a global context.
return
(
global_
->
del
(
name
));
}
...
...
src/lib/stats/stats_mgr.h
View file @
5b018cab
// Copyright (C) 2015 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2015
,2017
Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
...
...
@@ -28,7 +28,7 @@ namespace stats {
/// As of May 2015, Tomek ran performance benchmarks (see unit-tests in
/// stats_mgr_unittest.cc with performance in their names) and it seems
/// the code is able to register ~2.5-3 million observations per second, even
/// with 1000 different statistics recored. That seems sufficient for now,
/// with 1000 different statistics recor
d
ed. That seems sufficient for now,
/// so there is no immediate need to develop any multi-threading solutions
/// for now. However, should this decision be revised in the future, the
/// best place for it would to be modify @ref addObservation method here.
...
...
@@ -47,7 +47,7 @@ namespace stats {
/// significantly. While it's possible to log on sufficiently high debug
/// level, such a log would be not that useful)
/// - dependency (statistics are intended to be a lightweight library, adding
/// dependency on libkea-log, which has its own dependecies, including
/// dependency on libkea-log, which has its own depende
n
cies, including
/// external log4cplus, is against 'lightweight' design)
/// - if logging of specific statistics is warranted, it is recommended to
/// add log entries in the code that calls StatsMgr.
...
...
src/lib/testutils/dhcp_test_lib.sh.in
View file @
5b018cab
# Copyright (C) 2014-2015 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2014-2015
,2017
Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
...
...
@@ -174,7 +174,7 @@ fi
# This function uses PID file to obtain the PID and then calls
# 'kill -0 <pid>' to check if the process is alive.
# The PID files are expected to be located in the ${PID_FILE_PATH},
# and their names should match the follwing pattern:
# and their names should match the foll
o
wing pattern:
# <cfg_file_name>.<proc_name>.pid. If the <cfg_file_name> is not
# specified a 'test_config' is used by default.
#
...
...
@@ -261,8 +261,8 @@ get_log_messages() {
# _GET_RECONFIGS: number of configurations so far.
# _GET_RECONFIG_ERRORS: number of configuration errors.
get_reconfigs() {
# Grep log file for CONFIG_COMPLETE occurences. There should
# be one occurence per (re)configuration.
# Grep log file for CONFIG_COMPLETE occur
r
ences. There should
# be one occur
r
ence per (re)configuration.
_GET_RECONFIGS=$( grep -o CONFIG_COMPLETE ${LOG_FILE} | wc -w )
# Grep log file for CONFIG_LOAD_FAIL to check for configuration
# failures.
...
...
@@ -318,7 +318,7 @@ cleanup() {
}
# Exists the test in the clean way.
# It peformes the cleanup and prints whether the test has passed or failed.
# It pe
r
formes the cleanup and prints whether the test has passed or failed.
# If a test fails, the Kea log is dumped.
clean_exit() {
exit_code=${1} # Exit code to be returned by the exit function.
...
...
@@ -384,7 +384,7 @@ wait_for_kea() {
# of message occurrences to show up. If the expected number of
# message doesn't occur, the error status is returned.
# Return value:
# _WAIT_FOR_MESSAGE: 0 if the message hasn't occured, 1 otherwise.
# _WAIT_FOR_MESSAGE: 0 if the message hasn't occur
r
ed, 1 otherwise.
wait_for_message() {
local timeout=${1} # Expected timeout value in seconds.
local message="${2}" # Expected message id.
...
...
@@ -435,7 +435,7 @@ must be a number"
# Waits for server to be down.
# Return value:
# _WAIT_FOR_SERVER_DOWN: 1 if server is down, 0 if timeout occured and the
# _WAIT_FOR_SERVER_DOWN: 1 if server is down, 0 if timeout occur
r
ed and the
# server is still running.
wait_for_server_down() {
local timeout=${1} # Timeout specified in seconds.
...
...
src/lib/util/csv_file.h
View file @
5b018cab
// Copyright (C) 2014-201
6
Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2014-201
7
Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
...
...
@@ -391,7 +391,7 @@ public:
/// true, the file will be opened and the internal pointer will be set
/// to the end of file.
///
/// @param seek_to_end A boolean value which indicates if the in
t
put and
/// @param seek_to_end A boolean value which indicates if the input and
/// output file pointer should be set at the end of file.
///
/// @throw CSVFileError when IO operation fails.
...
...
src/lib/util/range_utilities.h
View file @
5b018cab
// Copyright (C) 2012-2015 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2012-2015
,2017
Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
...
...
@@ -39,7 +39,7 @@ isRangeZero(Iterator begin, Iterator end) {
/// after every start of your process. Calling srand() is enough. This
/// method uses default rand(), which is usually a LCG pseudo-random
/// number generator, so it is not suitable for security
/// purposes. Please get a decent PRNG implementation, like Mersene
/// purposes. Please get a decent PRNG implementation, like Mersen
n
e
/// twister, if you are doing anything related with security.
///
/// PRNG initialization is left out of this function on purpose. It may
...
...
src/lib/util/state_model.cc
View file @
5b018cab
// Copyright (C) 2013-201
6
Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2013-201
7
Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
...
...
@@ -84,7 +84,7 @@ StateModel::~StateModel(){
void
StateModel
::
startModel
(
const
int
start_state
)
{
// Intialize dictionaries of events and states.
// In
i
tialize dictionaries of events and states.
initDictionaries
();
// Set the current state to starting state and enter the run loop.
...
...
@@ -232,7 +232,7 @@ StateModel::verifyStates() {
getState
(
END_ST
);
}
void
void
StateModel
::
onModelFailure
(
const
std
::
string
&
)
{
// Empty implementation to make deriving classes simpler.
}
...
...
src/lib/util/state_model.h
View file @
5b018cab
// Copyright (C) 2013-201
6
Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2013-201
7
Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
...
...
@@ -90,7 +90,7 @@ public:
/// @brief Adds a state definition to the set of states.
///
/// @param value is the numeric value of the state
/// @param label is the text label to assig to the state
/// @param label is the text label to assig
n
to the state
/// @param handler is the bound instance method which handles the state's
///
/// @throw StateModelError if the value is already defined in the set, or
...
...
@@ -265,7 +265,7 @@ public:
/// @brief Begins execution of the model.
///
/// This method invokes initDictionaries method to initialize the event
/// and state dictionaries and then starts the model execution setting
/// and state dictionaries and then starts the model execution setting
/// the current state to the given start state, and the event to START_EVT.
///
/// @param start_state is the state in which to begin execution.
...
...
@@ -314,7 +314,7 @@ protected:
/// @brief Initializes the event and state dictionaries.
///
/// This method invokes the define and verify methods for both events and
/// states to initialize their respective dictionaries.
/// states to initialize their respective dictionaries.
///
/// @throw StateModelError or others indirectly, as this method calls
/// dictionary define and verify methods.
...
...
src/lib/util/stopwatch_impl.h
View file @
5b018cab
// Copyright (C) 2015 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2015
,2017
Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
...
...
@@ -93,7 +93,7 @@ protected:
///
/// This method is used internally by the @c StopwatchImpl class and
/// its derivations. This class simply returns the value of
/// @c boost::posix_time::micr
i
sec_clock::univeral_time(), which is
/// @c boost::posix_time::micr
o
sec_clock::univeral_time(), which is
/// a current timestamp. The derivations may replace it with the
/// custom implementations. The typical use case is for the unit tests
/// to customize the behavior of this function to return well known
...
...
src/lib/util/versioned_csv_file.h
View file @
5b018cab
// Copyright (C) 2015 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2015
,2017
Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
...
...
@@ -171,7 +171,7 @@ public:
/// @brief Returns the number of valid columns found in the header
/// For newly created files this will always match the number of defined
/// columns (i.e. getColumnCount()). For existing files, this will be
/// the number of columns in the header that match the defined column
n
s.
/// the number of columns in the header that match the defined columns.
/// When this number is less than getColumnCount() it means the input file
/// is from an earlier schema. This value is zero until the file has
/// been opened.
...
...
@@ -189,7 +189,7 @@ public:
/// true, the file will be opened and the internal pointer will be set
/// to the end of file.
///
/// @param seek_to_end A boolean value which indicates if the in
t
put and
/// @param seek_to_end A boolean value which indicates if the input and
/// output file pointer should be set at the end of file.
///
/// @throw VersionedCSVFileError if schema has not been defined,
...
...
src/lib/util/watch_socket.cc
View file @
5b018cab
// Copyright (C) 2014-2015 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2014-2015
,2017
Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
...
...
@@ -131,7 +131,7 @@ WatchSocket::closeSocket(std::string& error_string) {
// destructors that throw.
if
(
source_
!=
SOCKET_NOT_VALID
)
{
if
(
close
(
source_
))
{
// An error occured.
// An error occur
r
ed.
s
<<
"Could not close source: "
<<
strerror
(
errno
);
}
...
...
@@ -140,7 +140,7 @@ WatchSocket::closeSocket(std::string& error_string) {
if
(
sink_
!=
SOCKET_NOT_VALID
)
{
if
(
close
(
sink_
))
{
// An error occured.
// An error occur
r
ed.
if
(
error_string
.
empty
())
{
s
<<
"could not close sink: "
<<
strerror
(
errno
);
}
...
...
tools/system_messages.cc
View file @
5b018cab
// Copyright (C) 2015-201
6
Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2015-201
7
Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
...
...
@@ -486,7 +486,7 @@ void processFileContent(const std::string& filename,
}
}
// All done, add the last message to the global dictiona
t
y.
// All done, add the last message to the global dictiona
r
y.
if
(
!
msgid
.
empty
())
{
addToDictionary
(
msgid
,
msgtext
,
description
,
filename
);
}
...
...
@@ -547,7 +547,7 @@ void processFile(const std::string& filename)
if
(
line
[
0
]
!=
'#'
)
{
lines1
.
push_back
(
line
);
}
}
}
// Remove leading/trailing empty line sequences from the result
LinesType
lines2
=
removeEmptyLeadingTrailing
(
lines1
);
...
...
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