mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-31 05:55:28 +00:00
[master] Finished merge of trac3920 (data_ defined twice)
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
979. [bug] fdupont
|
||||
Fixed two cases of public variables in a base class being
|
||||
hidden by variables in a derived class.
|
||||
(Trac #3920, git xxx)
|
||||
|
||||
978. [func] tmark
|
||||
DHCPv4, DHCPv6, and DHCP_DDNS now all create PID files upon
|
||||
startup. The PID file pathname is formed from:
|
||||
|
@@ -44,7 +44,7 @@ DControllerBase::DControllerBase(const char* app_name, const char* bin_name)
|
||||
: app_name_(app_name), bin_name_(bin_name),
|
||||
verbose_(false), spec_file_name_(""),
|
||||
io_service_(new isc::asiolink::IOService()),
|
||||
signal_set_(), io_signal_queue_() {
|
||||
io_signal_queue_() {
|
||||
}
|
||||
|
||||
void
|
||||
|
@@ -23,7 +23,6 @@
|
||||
#include <dhcpsrv/daemon.h>
|
||||
#include <exceptions/exceptions.h>
|
||||
#include <log/logger_support.h>
|
||||
#include <util/signal_set.h>
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/noncopyable.hpp>
|
||||
@@ -506,9 +505,6 @@ private:
|
||||
/// @brief Shared pointer to an IOService object, used for ASIO operations.
|
||||
asiolink::IOServicePtr io_service_;
|
||||
|
||||
/// @brief Set of registered signals to handle.
|
||||
util::SignalSetPtr signal_set_;
|
||||
|
||||
/// @brief Queue for propagating caught signals to the IOService.
|
||||
IOSignalQueuePtr io_signal_queue_;
|
||||
|
||||
|
@@ -48,8 +48,12 @@ Pkt::Pkt(const uint8_t* buf, uint32_t len, const isc::asiolink::IOAddress& local
|
||||
remote_port_(remote_port),
|
||||
buffer_out_(0)
|
||||
{
|
||||
data_.resize(len);
|
||||
if (len) {
|
||||
|
||||
if (len != 0) {
|
||||
if (buf == NULL) {
|
||||
isc_throw(InvalidParameter, "data buffer passed to Pkt is NULL");
|
||||
}
|
||||
data_.resize(len);
|
||||
memcpy(&data_[0], buf, len);
|
||||
}
|
||||
}
|
||||
|
@@ -74,14 +74,7 @@ Pkt4::Pkt4(const uint8_t* data, size_t len)
|
||||
isc_throw(OutOfRange, "Truncated DHCPv4 packet (len=" << len
|
||||
<< ") received, at least " << DHCPV4_PKT_HDR_LEN
|
||||
<< " is expected.");
|
||||
|
||||
} else if (data == NULL) {
|
||||
isc_throw(InvalidParameter, "data buffer passed to Pkt4 is NULL");
|
||||
}
|
||||
|
||||
data_.resize(len);
|
||||
memcpy(&data_[0], data, len);
|
||||
|
||||
memset(sname_, 0, MAX_SNAME_LEN);
|
||||
memset(file_, 0, MAX_FILE_LEN);
|
||||
}
|
||||
|
@@ -366,24 +366,6 @@ public:
|
||||
/// (true) or non-relayed (false).
|
||||
bool isRelayed() const;
|
||||
|
||||
/// @brief That's the data of input buffer used in RX packet.
|
||||
///
|
||||
/// @note Note that InputBuffer does not store the data itself, but just
|
||||
/// expects that data will be valid for the whole life of InputBuffer.
|
||||
/// Therefore we need to keep the data around.
|
||||
///
|
||||
/// @warning This public member is accessed by derived
|
||||
/// classes directly. One of such derived classes is
|
||||
/// @ref perfdhcp::PerfPkt4. The impact on derived clasess'
|
||||
/// behavior must be taken into consideration before making
|
||||
/// changes to this member such as access scope restriction or
|
||||
/// data format change etc. This field is also public, because
|
||||
/// it may be modified by callouts (which are written in C++ now,
|
||||
/// but we expect to also have them in Python, so any accesibility
|
||||
/// methods would overly complicate things here and degrade
|
||||
/// performance).
|
||||
std::vector<uint8_t> data_;
|
||||
|
||||
private:
|
||||
|
||||
/// @brief Generic method that validates and sets HW address.
|
||||
|
Reference in New Issue
Block a user