"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/bin/dhcp4/ctrl_dhcp4_srv.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).

ctrl_dhcp4_srv.cc  (kea-1.6.1):ctrl_dhcp4_srv.cc  (kea-1.6.2)
// Copyright (C) 2014-2019 Internet Systems Consortium, Inc. ("ISC") // Copyright (C) 2014-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 <cc/data.h> #include <cc/data.h>
#include <cc/command_interpreter.h> #include <cc/command_interpreter.h>
#include <config/command_mgr.h> #include <config/command_mgr.h>
#include <dhcp4/ctrl_dhcp4_srv.h> #include <dhcp4/ctrl_dhcp4_srv.h>
skipping to change at line 1019 skipping to change at line 1019
ControlledDhcpv4Srv::dbLostCallback(ReconnectCtlPtr db_reconnect_ctl) { ControlledDhcpv4Srv::dbLostCallback(ReconnectCtlPtr db_reconnect_ctl) {
// Disable service until we recover // Disable service until we recover
network_state_->disableService(); network_state_->disableService();
if (!db_reconnect_ctl) { if (!db_reconnect_ctl) {
// This shouldn't never happen // This shouldn't never happen
LOG_ERROR(dhcp4_logger, DHCP4_DB_RECONNECT_NO_DB_CTL); LOG_ERROR(dhcp4_logger, DHCP4_DB_RECONNECT_NO_DB_CTL);
return (false); return (false);
} }
// If reconnect isn't enabled, log it and return false // If reconnect isn't enabled or we're out of retries,
// log it, schedule a shutdown, and return false
if (!db_reconnect_ctl->retriesLeft() || if (!db_reconnect_ctl->retriesLeft() ||
!db_reconnect_ctl->retryInterval()) { !db_reconnect_ctl->retryInterval()) {
LOG_INFO(dhcp4_logger, DHCP4_DB_RECONNECT_DISABLED) LOG_INFO(dhcp4_logger, DHCP4_DB_RECONNECT_DISABLED)
.arg(db_reconnect_ctl->retriesLeft()) .arg(db_reconnect_ctl->retriesLeft())
.arg(db_reconnect_ctl->retryInterval()); .arg(db_reconnect_ctl->retryInterval());
ControlledDhcpv4Srv::processCommand("shutdown", ConstElementPtr());
return(false); return(false);
} }
// Invoke reconnect method // Invoke reconnect method
dbReconnect(db_reconnect_ctl); dbReconnect(db_reconnect_ctl);
return(true); return(true);
} }
void void
 End of changes. 3 change blocks. 
2 lines changed or deleted 4 lines changed or added

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