From: Marcin Siodelski Date: Tue, 21 Oct 2014 09:46:01 +0000 (+0200) Subject: [3587] Added warnings to the CfgMgr::revert and SrvConfig::copy functions. X-Git-Tag: trac3629a_base~1^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3c5e189ef8becad7b878b222065fc8ab2c8dd3ca;p=thirdparty%2Fkea.git [3587] Added warnings to the CfgMgr::revert and SrvConfig::copy functions. --- diff --git a/src/lib/dhcpsrv/cfgmgr.h b/src/lib/dhcpsrv/cfgmgr.h index 2a87eb9aa7..040bb03fb0 100644 --- a/src/lib/dhcpsrv/cfgmgr.h +++ b/src/lib/dhcpsrv/cfgmgr.h @@ -331,6 +331,11 @@ public: /// @warning Revert operation will rollback any changes to the staging /// configuration (if it exists). /// + /// @warning This function requires that the entire previous configuration + /// is copied to the new configuration object. This is not working for + /// some of the complex configuration objects, e.g. subnets. Hence, the + /// "revert" operation is not really usable at this point. + /// /// @param index A distance from the current configuration to the /// past configuration to be reverted. The minimal value is 1 which points /// to the nearest configuration. diff --git a/src/lib/dhcpsrv/srv_config.h b/src/lib/dhcpsrv/srv_config.h index 6ffca74b9c..9370e87a86 100644 --- a/src/lib/dhcpsrv/srv_config.h +++ b/src/lib/dhcpsrv/srv_config.h @@ -209,6 +209,14 @@ public: /// an object passed as parameter. The configuration sequence is not /// copied. /// + /// @warning Some of the configuration objects are not copied at + /// this point, e.g. subnets. This is because they contain quite complex + /// data structures and they make use of pointers, so in many cases + /// the default copy constructors can't be used. Implementing this + /// requires quite a lot of time so this is left as is for now. + /// The lack of ability to copy the entire configuration makes + /// revert function of the @c CfgMgr unsuable. + /// /// @param [out] new_config An object to which the configuration will /// be copied. void copy(SrvConfig& new_config) const;