Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Kea
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Adam Osuchowski
Kea
Commits
14a6ed7d
Commit
14a6ed7d
authored
Mar 02, 2015
by
Shawn Routhier
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'trac3706' Tidy up some issues find by cpp check
parents
495a29ab
c9741c51
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
28 additions
and
12 deletions
+28
-12
src/lib/dhcp/pkt6.cc
src/lib/dhcp/pkt6.cc
+4
-1
src/lib/dhcpsrv/host.cc
src/lib/dhcpsrv/host.cc
+2
-2
src/lib/dhcpsrv/memfile_lease_mgr.cc
src/lib/dhcpsrv/memfile_lease_mgr.cc
+1
-2
src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc
src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc
+0
-1
src/lib/log/logger_unittest_support.cc
src/lib/log/logger_unittest_support.cc
+1
-2
src/lib/util/process_spawn.cc
src/lib/util/process_spawn.cc
+8
-1
src/lib/util/process_spawn.h
src/lib/util/process_spawn.h
+10
-1
tests/tools/dhcp-ubench/memfile_ubench.cc
tests/tools/dhcp-ubench/memfile_ubench.cc
+2
-2
No files found.
src/lib/dhcp/pkt6.cc
View file @
14a6ed7d
...
...
@@ -313,7 +313,10 @@ Pkt6::unpackMsg(OptionBuffer::const_iterator begin,
((
*
begin
++
)
<<
8
)
+
(
*
begin
++
);
transid_
=
transid_
&
0xffffff
;
size
-=
sizeof
(
uint32_t
);
// We just parsed 4 bytes header
// See below about invoking Postel's law, as we aren't using
// size we don't need to update it. If we do so in the future
// perhaps for stats gathering we can uncomment this.
// size -= sizeof(uint32_t); // We just parsed 4 bytes header
OptionBuffer
opt_buffer
(
begin
,
end
);
...
...
src/lib/dhcpsrv/host.cc
View file @
14a6ed7d
...
...
@@ -225,8 +225,8 @@ void
Host
::
addClientClassInternal
(
ClientClasses
&
classes
,
const
std
::
string
&
class_name
)
{
std
::
string
trimmed
=
util
::
str
::
trim
(
class_name
);
if
(
!
class_name
.
empty
())
{
classes
.
insert
(
ClientClass
(
class_name
));
if
(
!
trimmed
.
empty
())
{
classes
.
insert
(
ClientClass
(
trimmed
));
}
}
...
...
src/lib/dhcpsrv/memfile_lease_mgr.cc
View file @
14a6ed7d
...
...
@@ -806,8 +806,7 @@ Memfile_LeaseMgr::lfcSetup() {
template
<
typename
LeaseFileType
>
void
Memfile_LeaseMgr
::
lfcExecute
(
boost
::
shared_ptr
<
LeaseFileType
>&
lease_file
)
{
bool
do_lfc
=
true
;
// This string will hold a reason for the failure to rote the lease files.
std
::
string
error_string
=
"(no details)"
;
// Check if the copy of the lease file exists already. If it does, it
// is an indication that another LFC instance may be in progress or
// may be stalled. In that case we don't want to rotate the current
...
...
src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc
View file @
14a6ed7d
...
...
@@ -155,7 +155,6 @@ public:
++
i
)
{
Memfile_LeaseMgr
::
LFCFileType
type
=
static_cast
<
Memfile_LeaseMgr
::
LFCFileType
>
(
i
);
std
::
string
suffix
=
Memfile_LeaseMgr
::
appendSuffix
(
base_name
,
type
);
LeaseFileIO
io
(
Memfile_LeaseMgr
::
appendSuffix
(
base_name
,
type
));
io
.
removeFile
();
}
...
...
src/lib/log/logger_unittest_support.cc
View file @
14a6ed7d
// Copyright (C) 2011,2014 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2011,2014
,2015
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
...
...
@@ -80,7 +80,6 @@ void initLogger(isc::log::Severity severity, int dbglevel) {
// Root logger name is defined by the environment variable KEA_LOGGER_ROOT.
// If not present, the name is "kea".
const
char
*
DEFAULT_ROOT
=
"kea"
;
const
char
*
root
=
getenv
(
"KEA_LOGGER_ROOT"
);
if
(
!
root
)
{
// If not present, the name is "kea".
...
...
src/lib/util/process_spawn.cc
View file @
14a6ed7d
...
...
@@ -30,7 +30,14 @@ namespace util {
/// avoid exposing the internals of the implementation, such as
/// custom handling of a SIGCHLD signal, and the conversion of the
/// arguments of the executable from the STL container to the array.
class
ProcessSpawnImpl
{
///
/// This class is made noncopyable so that we don't have attempts
/// to make multiple copies of an object. This avoid problems
/// with multiple copies of objects for a single global resource
/// such as the SIGCHLD signal handler. In addition making it
/// noncopyable keeps the static check code from flagging the
/// lack of a copy constructor as an issue.
class
ProcessSpawnImpl
:
boost
::
noncopyable
{
public:
/// @brief Constructor.
...
...
src/lib/util/process_spawn.h
View file @
14a6ed7d
...
...
@@ -16,6 +16,7 @@
#define PROCESS_SPAWN_H
#include <exceptions/exceptions.h>
#include <boost/noncopyable.hpp>
#include <string>
#include <sys/types.h>
#include <vector>
...
...
@@ -53,10 +54,18 @@ typedef std::vector<std::string> ProcessArgs;
/// attempt to register a new SIGCHLD signal handler and, as a
/// consequence, the new @c ProcessSpawn object will fail to create.
///
/// This class is made noncopyable so that we don't have attempts
/// to make multiple copies of an object. This avoid problems
/// with multiple copies of objects for a single global resource
/// such as the SIGCHLD signal handler. In addition making it
/// noncopyable keeps the static check code from flagging the
/// lack of a copy constructor as an issue.
///
/// @todo The SIGCHLD handling logic should be moved to the @c SignalSet
/// class so as multiple instances of the @c ProcessSpawn use the same
/// SIGCHLD signal handler.
class
ProcessSpawn
{
class
ProcessSpawn
:
boost
::
noncopyable
{
public:
/// @brief Constructor.
...
...
tests/tools/dhcp-ubench/memfile_ubench.cc
View file @
14a6ed7d
// Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2012
, 2015
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
...
...
@@ -247,7 +247,7 @@ void memfile_uBenchmark::createLease4Test() {
lease
->
cltt
=
cltt
;
lease
->
pool_id
=
pool_id
;
lease
->
fixed
=
fixed
;
lease
->
hostname
=
"foo"
;
lease
->
hostname
=
hostname
;
lease
->
fqdn_fwd
=
fqdn_fwd
;
lease
->
fqdn_rev
=
fqdn_rev
;
...
...
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