Skip to content

Commit bd3932c

Browse files
committed
[#3268] Updated hooks
1 parent 4883397 commit bd3932c

File tree

7 files changed

+11
-10
lines changed

7 files changed

+11
-10
lines changed

src/hooks/dhcp/perfmon/perfmon_callouts.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ int pkt4_send(CalloutHandle& handle) {
6969
Pkt4Ptr response;
7070
handle.getArgument("response4", response);
7171

72-
Subnet4Ptr subnet;
72+
ConstSubnet4Ptr subnet;
7373
handle.getArgument("subnet4", subnet);
7474

7575
try {
@@ -101,7 +101,7 @@ int pkt6_send(CalloutHandle& handle) {
101101
Pkt6Ptr response;
102102
handle.getArgument("response6", response);
103103

104-
Subnet6Ptr subnet;
104+
ConstSubnet6Ptr subnet;
105105
handle.getArgument("subnet6", subnet);
106106

107107
try {

src/hooks/dhcp/perfmon/perfmon_mgr.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ PerfMonMgr::configure(const ConstElementPtr& params) {
6868
}
6969

7070
void
71-
PerfMonMgr::processPktEventStack(PktPtr query, PktPtr response, SubnetPtr subnet) {
71+
PerfMonMgr::processPktEventStack(PktPtr query, PktPtr response,
72+
ConstSubnetPtr subnet) {
7273
if (!query) {
7374
isc_throw(Unexpected, "PerfMonMgr::processPktEventStack - query is empty!");
7475
}

src/hooks/dhcp/perfmon/perfmon_mgr.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class PerfMonMgr : public PerfMonConfig, private config::CmdsImpl {
6464
/// subnet id.
6565
void processPktEventStack(isc::dhcp::PktPtr query,
6666
isc::dhcp::PktPtr response,
67-
const isc::dhcp::SubnetPtr subnet);
67+
const isc::dhcp::ConstSubnetPtr subnet);
6868

6969
/// @brief Adds a duration sample to a MonitoredDuration.
7070
///

src/hooks/dhcp/run_script/run_script.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ RunScriptImpl::extractOptionIA(ProcessEnvVars& vars,
175175

176176
void
177177
RunScriptImpl::extractSubnet4(ProcessEnvVars& vars,
178-
const Subnet4Ptr subnet4,
178+
const ConstSubnet4Ptr subnet4,
179179
const string& prefix,
180180
const string& suffix) {
181181
if (subnet4) {
@@ -198,7 +198,7 @@ RunScriptImpl::extractSubnet4(ProcessEnvVars& vars,
198198

199199
void
200200
RunScriptImpl::extractSubnet6(ProcessEnvVars& vars,
201-
const Subnet6Ptr subnet6,
201+
const ConstSubnet6Ptr subnet6,
202202
const string& prefix,
203203
const string& suffix) {
204204
if (subnet6) {

src/hooks/dhcp/run_script/run_script.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ class RunScriptImpl {
131131
/// @param prefix The prefix for the name of the environment variable.
132132
/// @param suffix The suffix for the name of the environment variable.
133133
static void extractSubnet4(isc::asiolink::ProcessEnvVars& vars,
134-
const isc::dhcp::Subnet4Ptr subnet4,
134+
const isc::dhcp::ConstSubnet4Ptr subnet4,
135135
const std::string& prefix = "",
136136
const std::string& suffix = "");
137137

@@ -141,7 +141,7 @@ class RunScriptImpl {
141141
/// @param prefix The prefix for the name of the environment variable.
142142
/// @param suffix The suffix for the name of the environment variable.
143143
static void extractSubnet6(isc::asiolink::ProcessEnvVars& vars,
144-
const isc::dhcp::Subnet6Ptr subnet6,
144+
const isc::dhcp::ConstSubnet6Ptr subnet6,
145145
const std::string& prefix = "",
146146
const std::string& suffix = "");
147147

src/hooks/dhcp/run_script/run_script_callouts.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ int lease4_renew(CalloutHandle& handle) {
100100
Pkt4Ptr pkt4;
101101
handle.getArgument("query4", pkt4);
102102
RunScriptImpl::extractPkt4(vars, pkt4, "QUERY4");
103-
Subnet4Ptr subnet4;
103+
ConstSubnet4Ptr subnet4;
104104
handle.getArgument("subnet4", subnet4);
105105
RunScriptImpl::extractSubnet4(vars, subnet4, "SUBNET4");
106106
ClientIdPtr clientid;

src/hooks/dhcp/run_script/tests/run_script_unittests.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,7 @@ TEST_F(RunScriptTest, lease4Renew) {
877877
CalloutHandle handle(getCalloutManager());
878878
Pkt4Ptr pkt4 = generatePkt4();
879879
handle.setArgument("query4", pkt4);
880-
Subnet4Ptr subnet4 = generateSubnet4();
880+
ConstSubnet4Ptr subnet4 = generateSubnet4();
881881
handle.setArgument("subnet4", subnet4);
882882
ClientIdPtr clientid = generateClientId();
883883
handle.setArgument("clientid", clientid);

0 commit comments

Comments
 (0)