]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3587] Added warnings to the CfgMgr::revert and SrvConfig::copy functions.
authorMarcin Siodelski <marcin@isc.org>
Tue, 21 Oct 2014 09:46:01 +0000 (11:46 +0200)
committerMarcin Siodelski <marcin@isc.org>
Tue, 21 Oct 2014 09:46:01 +0000 (11:46 +0200)
src/lib/dhcpsrv/cfgmgr.h
src/lib/dhcpsrv/srv_config.h

index 2a87eb9aa70f782e753a5d1be000eb8390d9071e..040bb03fb0a0719d95613e012d34efc1772928de 100644 (file)
@@ -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.
index 6ffca74b9cac24a8620b0553677a162b5d0d60b1..9370e87a867bc50eb303807a4127810c141f3a57 100644 (file)
@@ -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;