"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/hooks/dhcp/mysql_cb/mysql_cb_dhcp4.cc" between
kea-1.6.1.tar.gz and kea-1.6.2.tar.gz

About: Kea is a modern DHCPv4 & DHCPv6 Server (potential successor of ISC DHCP).

mysql_cb_dhcp4.cc  (kea-1.6.1):mysql_cb_dhcp4.cc  (kea-1.6.2)
// Copyright (C) 2018-2019 Internet Systems Consortium, Inc. ("ISC") // Copyright (C) 2018-2020 Internet Systems Consortium, Inc. ("ISC")
// //
// This Source Code Form is subject to the terms of the Mozilla Public // 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 // License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/. // file, You can obtain one at http://mozilla.org/MPL/2.0/.
#include <config.h> #include <config.h>
#include <mysql_cb_dhcp4.h> #include <mysql_cb_dhcp4.h>
#include <mysql_cb_impl.h> #include <mysql_cb_impl.h>
#include <mysql_query_macros_dhcp.h> #include <mysql_query_macros_dhcp.h>
skipping to change at line 340 skipping to change at line 340
if (!subnets.empty()) { if (!subnets.empty()) {
last_subnet = *subnets.rbegin(); last_subnet = *subnets.rbegin();
} }
// Subnet has been returned. Assuming that subnets are ordered by // Subnet has been returned. Assuming that subnets are ordered by
// subnet identifier, if the subnet identifier of the current row // subnet identifier, if the subnet identifier of the current row
// is different than the subnet identifier of the previously returne d // is different than the subnet identifier of the previously returne d
// row, it means that we have to construct new subnet object. // row, it means that we have to construct new subnet object.
if (!last_subnet || (last_subnet->getID() != out_bindings[0]->getInt eger<uint32_t>())) { if (!last_subnet || (last_subnet->getID() != out_bindings[0]->getInt eger<uint32_t>())) {
// Reset pool id, because current row defines new subnet. Subseq // Reset per subnet component tracking and server tag because
uent // we're now starting to process a new subnet.
// rows will contain pool information.
last_pool_id = 0; last_pool_id = 0;
last_pool_option_id = 0;
// Reset last server tag as we're now starting to process new su last_option_id = 0;
bnet. last_pool.reset();
last_tag.clear(); last_tag.clear();
// subnet_id // subnet_id
SubnetID subnet_id(out_bindings[0]->getInteger<uint32_t>()); SubnetID subnet_id(out_bindings[0]->getInteger<uint32_t>());
// subnet_prefix // subnet_prefix
std::string subnet_prefix = out_bindings[1]->getString(); std::string subnet_prefix = out_bindings[1]->getString();
auto prefix_pair = Subnet4::parsePrefix(subnet_prefix); auto prefix_pair = Subnet4::parsePrefix(subnet_prefix);
// renew_timer // renew_timer
auto renew_timer = createTriplet(out_bindings[13]); auto renew_timer = createTriplet(out_bindings[13]);
// rebind_timer // rebind_timer
skipping to change at line 1223 skipping to change at line 1224
SharedNetwork4Ptr last_network; SharedNetwork4Ptr last_network;
if (!shared_networks.empty()) { if (!shared_networks.empty()) {
last_network = *shared_networks.rbegin(); last_network = *shared_networks.rbegin();
} }
// If this is the first shared network or the shared network id in t his // If this is the first shared network or the shared network id in t his
// row points to the next shared network we use the data in the // row points to the next shared network we use the data in the
// row to create the new shared network instance. // row to create the new shared network instance.
if (last_network_id != out_bindings[0]->getInteger<uint64_t>()) { if (last_network_id != out_bindings[0]->getInteger<uint64_t>()) {
// Reset last server tag as we're now starting to process new // Reset per shared network subnet component tracking and server
// shared network. tag because
// we're now starting to process a new shared network.
last_option_id = 0;
last_tag.clear(); last_tag.clear();
last_network_id = out_bindings[0]->getInteger<uint64_t>(); last_network_id = out_bindings[0]->getInteger<uint64_t>();
last_network = SharedNetwork4::create(out_bindings[1]->getString ()); last_network = SharedNetwork4::create(out_bindings[1]->getString ());
last_network->setId(last_network_id); last_network->setId(last_network_id);
// client_class // client_class
if (!out_bindings[2]->amNull()) { if (!out_bindings[2]->amNull()) {
last_network->allowClientClass(out_bindings[2]->getString()) ; last_network->allowClientClass(out_bindings[2]->getString()) ;
} }
 End of changes. 4 change blocks. 
9 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)