From: Michael J. Rubinsky Date: Sat, 24 Apr 2010 19:30:51 +0000 (-0400) Subject: Add configuration switch for forcing the server heartbeat interval. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=e1a191acc64bb7abcda533007facc1a4f94c5ea9;p=horde.git Add configuration switch for forcing the server heartbeat interval. For those of us who don't like devices telling us what we have to do...allow overriding the heartbeat interval so we can force it to be shorter then most devices would request...useful for managing load on the server. --- diff --git a/framework/ActiveSync/lib/Horde/ActiveSync/Request/Ping.php b/framework/ActiveSync/lib/Horde/ActiveSync/Request/Ping.php index c4ab8ed45..cde1ff3ea 100644 --- a/framework/ActiveSync/lib/Horde/ActiveSync/Request/Ping.php +++ b/framework/ActiveSync/lib/Horde/ActiveSync/Request/Ping.php @@ -42,6 +42,9 @@ class Horde_ActiveSync_Request_Ping extends Horde_ActiveSync_Request_Base protected function _checkHeartbeat($lifetime) { + if ($this->_ping_settings['forcedheartbeat']) { + return $this->_ping_settings['forcedheartbeat']; + } if ($lifetime !== 0 && $lifetime < $this->_ping_settings['heartbeatmin']) { $this->_statusCode = self::STATUS_HBOUTOFBOUNDS; $lifetime = $this->_ping_settings['heartbeatmin']; diff --git a/horde/config/conf.xml b/horde/config/conf.xml index c7275dcc1..f0fd854fd 100644 --- a/horde/config/conf.xml +++ b/horde/config/conf.xml @@ -2022,15 +2022,25 @@ correctly. If you plan on synching Android devices, you should make sure that this range is wide enough to allow Android's default of 470 seconds. - 60 - - 2700 - 480 - + true + + 60 + + 2700 + 480 + + + + 60 + + +