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
d85ff308
Commit
d85ff308
authored
Mar 02, 2015
by
Marcin Siodelski
Browse files
[master] Merge branch 'trac3728'
parents
d655a68f
a159d264
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/bin/lfc/lfc_controller.cc
View file @
d85ff308
...
...
@@ -115,7 +115,7 @@ LFCController::launch(int argc, char* argv[], const bool test_mode) {
}
else
{
processLeases
<
Lease6
,
CSVLeaseFile6
,
Lease6Storage
>
();
}
}
catch
(
const
isc
::
E
xception
&
proc_ex
)
{
}
catch
(
const
std
::
e
xception
&
proc_ex
)
{
// We don't want to do the cleanup but do want to get rid of the pid
do_rotate
=
false
;
LOG_FATAL
(
lfc_logger
,
LFC_FAIL_PROCESS
).
arg
(
proc_ex
.
what
());
...
...
src/bin/lfc/main.cc
View file @
d85ff308
...
...
@@ -12,11 +12,13 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
#include <config.h>
#include <lfc/lfc_controller.h>
#include <exceptions/exceptions.h>
#include <log/logger_support.h>
#include <log/logger_manager.h>
#include <config.h>
#include <boost/exception/diagnostic_information.hpp>
#include <boost/exception_ptr.hpp>
#include <iostream>
using
namespace
std
;
...
...
@@ -37,7 +39,12 @@ int main(int argc, char* argv[]) {
try
{
// 'false' value disables test mode.
lfc_controller
.
launch
(
argc
,
argv
,
false
);
}
catch
(
const
isc
::
Exception
&
ex
)
{
}
catch
(
const
boost
::
exception
&
ex
)
{
std
::
cerr
<<
boost
::
diagnostic_information
(
ex
)
<<
std
::
endl
;
ret
=
EXIT_FAILURE
;
}
catch
(
const
std
::
exception
&
ex
)
{
std
::
cerr
<<
"Service failed: "
<<
ex
.
what
()
<<
std
::
endl
;
ret
=
EXIT_FAILURE
;
}
...
...
src/lib/dhcpsrv/base_host_data_source.h
View file @
d85ff308
// Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 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
...
...
@@ -57,8 +57,7 @@ class BaseHostDataSource {
public:
/// @brief Default destructor implementation.
virtual
~
BaseHostDataSource
()
{
}
virtual
~
BaseHostDataSource
()
{
}
/// @brief Return all hosts for the specified HW address or DUID.
///
...
...
src/lib/dhcpsrv/cfg_hosts.h
View file @
d85ff308
...
...
@@ -18,6 +18,7 @@
#include <asiolink/io_address.h>
#include <dhcp/duid.h>
#include <dhcp/hwaddr.h>
#include <dhcpsrv/base_host_data_source.h>
#include <dhcpsrv/host.h>
#include <dhcpsrv/host_container.h>
#include <dhcpsrv/subnet_id.h>
...
...
@@ -42,9 +43,12 @@ namespace dhcp {
/// when the new configuration is applied for the server. The reservations
/// are retrieved by the @c HostMgr class when the server is allocating or
/// renewing an address or prefix for the particular client.
class
CfgHosts
:
public
WritableHostDataSource
{
class
CfgHosts
:
public
BaseHostDataSource
,
public
WritableHostDataSource
{
public:
/// @brief Destructor.
virtual
~
CfgHosts
()
{
}
/// @brief Return all hosts for the specified HW address or DUID.
///
/// This method returns all @c Host objects which represent reservations
...
...
src/lib/dhcpsrv/writable_host_data_source.h
View file @
d85ff308
// Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 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
...
...
@@ -15,22 +15,22 @@
#ifndef WRITABLE_HOST_DATA_SOURCE_H
#define WRITABLE_HOST_DATA_SOURCE_H
#include <dhcpsrv/base_host_data_source.h>
namespace
isc
{
namespace
dhcp
{
/// @brief Interface for retrieving writable host reservations.
///
/// This interface extends the @c BaseHostDataSource with methods which return
/// pointers to the @c Host objects, which can be modified.
class
WritableHostDataSource
:
public
BaseHostDataSource
{
/// This interface specifies the methods which return pointers to the
/// @c Host objects, which can be modified. Deriving from this interface
/// is needed if the class implementation must return the pointers to the
/// objects which may be modified by the caller. Such classes usually
/// also derive from the @c BaseHostDataSource to implement methods which
/// return the const objects.
class
WritableHostDataSource
{
public:
using
BaseHostDataSource
::
getAll
;
using
BaseHostDataSource
::
getAll4
;
using
BaseHostDataSource
::
get4
;
using
BaseHostDataSource
::
get6
;
/// @brief Default destructor implementation.
virtual
~
WritableHostDataSource
()
{
}
/// @brief Non-const version of the @c getAll const method.
///
...
...
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