]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[master] Removed silly limitation of 65 seconds for HA timeout.
authorMarcin Siodelski <marcin@isc.org>
Thu, 14 Jun 2018 14:37:43 +0000 (16:37 +0200)
committerMarcin Siodelski <marcin@isc.org>
Thu, 14 Jun 2018 14:38:39 +0000 (16:38 +0200)
Okayed on jabber.

src/hooks/dhcp/high_availability/ha_config.h
src/hooks/dhcp/high_availability/ha_config_parser.cc

index 12146ad6cfd94c994d9983645fb4381dcb1d22b4..86f9ded2dd29d066ed183b0ce04fb81ebc3c6ae6 100644 (file)
@@ -255,14 +255,14 @@ public:
     /// @brief Returns timeout for lease database synchronization.
     ///
     /// @return Timeout in milliseconds.
-    long getSyncTimeout() const {
+    uint32_t getSyncTimeout() const {
         return (sync_timeout_);
     }
 
     /// @brief Sets new lease database syncing timeout in milliseconds.
     ///
     /// @param sync_timeout new timeout for lease database synchornization.
-    void setSyncTimeout(const long sync_timeout) {
+    void setSyncTimeout(const uint32_t sync_timeout) {
         sync_timeout_ = sync_timeout;
     }
 
@@ -391,7 +391,7 @@ private:
     HAMode ha_mode_;               ///< Mode of operation.
     bool send_lease_updates_;      ///< Send lease updates to partner?
     bool sync_leases_;             ///< Synchronize databases on startup?
-    long sync_timeout_;            ///< Timeout for syncing lease database (ms)
+    uint32_t sync_timeout_;        ///< Timeout for syncing lease database (ms)
     uint32_t heartbeat_delay_;     ///< Heartbeat delay in milliseconds.
     uint32_t max_response_delay_;  ///< Max delay in response to heartbeats.
     uint32_t max_ack_delay_;       ///< Maximum DHCP message ack delay.
index 551f1a9113bc30e7d917dcf173b0ee30585945d1..a6241bd70b6835b642aa42c0b2877fedf0b890b2 100644 (file)
@@ -111,7 +111,7 @@ HAConfigParser::parseInternal(const HAConfigPtr& config_storage,
     config_storage->setSyncLeases(getBoolean(c, "sync-leases"));
 
     // Get 'sync-timeout'.
-    uint16_t sync_timeout = getAndValidateInteger<uint16_t>(c, "sync-timeout");
+    uint32_t sync_timeout = getAndValidateInteger<uint32_t>(c, "sync-timeout");
     config_storage->setSyncTimeout(sync_timeout);
 
     // Get 'heartbeat-delay'.