Projects
Kolab:16:Enterprise
kolab-syncroton
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 18
View file
kolab-syncroton.spec
Changed
@@ -36,7 +36,7 @@ %global _ap_sysconfdir %{_sysconfdir}/%{httpd_name} Name: kolab-syncroton -Version: 2.3.7 +Version: 2.3.8 Release: 1%{?dist} Summary: ActiveSync for Kolab Groupware @@ -195,6 +195,9 @@ %attr(0770,%{httpd_user},%{httpd_group}) %{_var}/log/%{name} %changelog +* Wed Dec 20 2017 Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> - 2.3.8-1 +- Release 2.3.8 + * Sun Aug 27 2017 Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> - 2.3.7-1 - Release 2.3.7
View file
debian.changelog
Changed
@@ -1,3 +1,9 @@ +kolab-syncroton (2.3.8-0~kolab1) unstable; urgency=low + + * Release 2.3.8 + + -- Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Wed, 20 Dec 2017 15:13:40 +0200 + kolab-syncroton (2.3.7-0~kolab1) unstable; urgency=low * Release 2.3.7
View file
kolab-syncroton-2.3.7.tar.gz/config/config.inc.php.dist -> kolab-syncroton-2.3.8.tar.gz/config/config.inc.php.dist
Changed
@@ -86,6 +86,9 @@ // Default: 180 $config'activesync_quiet_time' = 180; +// Defines maximum number of folders in a single Sync/Ping request. Default: 100. +$config'activesync_max_folders' = 100; + // When a device is reqistered, by default a set of folders are // subscribed for syncronization, i.e. INBOX and personal folders with // defined folder type:
View file
kolab-syncroton-2.3.7.tar.gz/lib/ext/Syncroton/Command/Ping.php -> kolab-syncroton-2.3.8.tar.gz/lib/ext/Syncroton/Command/Ping.php
Changed
@@ -22,7 +22,7 @@ const STATUS_MISSING_PARAMETERS = 3; const STATUS_REQUEST_FORMAT_ERROR = 4; const STATUS_INTERVAL_TO_GREAT_OR_SMALL = 5; - const STATUS_TO_MUCH_FOLDERS = 6; + const STATUS_TOO_MANY_FOLDERS = 6; const STATUS_FOLDER_NOT_FOUND = 7; const STATUS_GENERAL_ERROR = 8; @@ -64,6 +64,14 @@ } if (isset($xml->Folders->Folder)) { + $maxCollections = Syncroton_Registry::getMaxCollections(); + if ($maxCollections && count($xml->Folders->Folder) > $maxCollections) { + $ping = $this->_outputDom->documentElement; + $ping->appendChild($this->_outputDom->createElementNS('uri:Ping', 'Status', self::STATUS_TOO_MANY_FOLDERS)); + $ping->appendChild($this->_outputDom->createElementNS('uri:Ping', 'MaxFolders', $maxCollections)); + return; + } + $folders = array(); foreach ($xml->Folders->Folder as $folderXml) { try {
View file
kolab-syncroton-2.3.7.tar.gz/lib/ext/Syncroton/Command/Sync.php -> kolab-syncroton-2.3.8.tar.gz/lib/ext/Syncroton/Command/Sync.php
Changed
@@ -31,6 +31,7 @@ const STATUS_FOLDER_HIERARCHY_HAS_CHANGED = 12; const STATUS_RESEND_FULL_XML = 13; const STATUS_WAIT_INTERVAL_OUT_OF_RANGE = 14; + const STATUS_TOO_MANY_COLLECTIONS = 15; const CONFLICT_OVERWRITE_SERVER = 0; const CONFLICT_OVERWRITE_PIM = 1; @@ -141,6 +142,7 @@ $sync->appendChild($this->_outputDom->createElementNS('uri:AirSync', 'Status', self::STATUS_WAIT_INTERVAL_OUT_OF_RANGE)); $sync->appendChild($this->_outputDom->createElementNS('uri:AirSync', 'Limit', floor($maxInterval/$intervalDiv))); $this->_heartbeatInterval = null; + return; } $this->_globalWindowSize = isset($requestXML->WindowSize) ? (int)$requestXML->WindowSize : 100; @@ -161,7 +163,15 @@ $lastSyncCollection'options' = array(); } } - + + $maxCollections = Syncroton_Registry::getMaxCollections(); + if ($maxCollections && count($requestXML->Collections->Collection) > $maxCollections) { + $sync = $this->_outputDom->documentElement; + $sync->appendChild($this->_outputDom->createElementNS('uri:AirSync', 'Status', self::STATUS_TOO_MANY_COLLECTIONS)); + $sync->appendChild($this->_outputDom->createElementNS('uri:AirSync', 'Limit', $maxCollections)); + return; + } + $collections = array(); foreach ($requestXML->Collections->Collection as $xmlCollection) {
View file
kolab-syncroton-2.3.7.tar.gz/lib/ext/Syncroton/Registry.php -> kolab-syncroton-2.3.8.tar.gz/lib/ext/Syncroton/Registry.php
Changed
@@ -39,6 +39,7 @@ const PING_INTERVAL = 'ping_interval'; const QUIET_TIME = 'quiet_time'; const SESSION_VALIDATOR = 'session_validator'; + const MAX_COLLECTIONS = 'max_collections'; const DATABASE = 'database'; const TRANSACTIONMANAGER = 'transactionmanager'; @@ -293,6 +294,16 @@ } /** + * Return maximum number of collections in Sync/Ping request + * + * @return int + */ + public static function getMaxCollections() + { + return self::get(self::MAX_COLLECTIONS); + } + + /** * returns policy backend * * creates Syncroton_Backend_Policy on the fly if not set before via
View file
kolab-syncroton-2.3.7.tar.gz/lib/kolab_sync.php -> kolab-syncroton-2.3.8.tar.gz/lib/kolab_sync.php
Changed
@@ -166,9 +166,10 @@ Syncroton_Registry::setGALDataClass('kolab_sync_data_gal'); // Configuration - Syncroton_Registry::set(Syncroton_Registry::PING_TIMEOUT, $this->config->get('activesync_ping_timeout', 60)); - Syncroton_Registry::set(Syncroton_Registry::PING_INTERVAL, $this->config->get('activesync_ping_interval', 15 * 60)); - Syncroton_Registry::set(Syncroton_Registry::QUIET_TIME, $this->config->get('activesync_quiet_time', 3 * 60)); + Syncroton_Registry::set(Syncroton_Registry::PING_TIMEOUT, (int) $this->config->get('activesync_ping_timeout', 60)); + Syncroton_Registry::set(Syncroton_Registry::PING_INTERVAL, (int) $this->config->get('activesync_ping_interval', 15 * 60)); + Syncroton_Registry::set(Syncroton_Registry::QUIET_TIME, (int) $this->config->get('activesync_quiet_time', 3 * 60)); + Syncroton_Registry::set(Syncroton_Registry::MAX_COLLECTIONS, (int) $this->config->get('activesync_max_folders', 100)); // Run Syncroton $syncroton = new Syncroton_Server($userid);
View file
kolab-syncroton-2.3.7.tar.gz/lib/kolab_sync_data.php -> kolab-syncroton-2.3.8.tar.gz/lib/kolab_sync_data.php
Changed
@@ -1196,6 +1196,18 @@ } /** + * Returns folder ID from Kolab folder object + */ + protected function getFolderId($folder) + { + if (!$this->isMultiFolder()) { + return $this->defaultRootFolder; + } + + return $this->backend->folder_id($folder->get_name(), $folder->get_type()); + } + + /** * Convert contact from xml to kolab format * * @param Syncroton_Model_IEntry $data Contact data
View file
kolab-syncroton-2.3.7.tar.gz/lib/kolab_sync_data_calendar.php -> kolab-syncroton-2.3.8.tar.gz/lib/kolab_sync_data_calendar.php
Changed
@@ -581,6 +581,30 @@ // Update/Save the event if (empty($existing)) { $folder = $this->save_event($event, $status); + + // Create SyncState for the new event, so it is not synced twice + if ($folder) { + $folderId = $this->getFolderId($folder); + + try { + $syncBackend = Syncroton_Registry::getSyncStateBackend(); + $folderBackend = Syncroton_Registry::getFolderBackend(); + $contentBackend = Syncroton_Registry::getContentStateBackend(); + $syncFolder = $folderBackend->getFolder($this->device->id, $folderId); + $syncState = $syncBackend->getSyncState($this->device->id, $syncFolder->id); + + $contentBackend->create(new Syncroton_Model_Content(array( + 'device_id' => $this->device->id, + 'folder_id' => $syncFolder->id, + 'contentid' => $this->serverId($event'uid', $folder), + 'creation_time' => $syncState->lastsync, + 'creation_synckey' => $syncState->counter, + ))); + } + catch (Exception $e) { + // ignore + } + } } else { $folder = $this->update_event($event, $existing, $status, $request->instanceId);
View file
kolab-syncroton-2.3.7.tar.gz/lib/kolab_sync_logger.php -> kolab-syncroton-2.3.8.tar.gz/lib/kolab_sync_logger.php
Changed
@@ -129,7 +129,7 @@ if ($mode <= self::WARN) { // send error to PHPs error handler if write to file didn't succeed - trigger_error($message, E_USER_ERROR); + trigger_error($message, E_USER_WARNING); } }
View file
kolab-syncroton.dsc
Changed
@@ -2,7 +2,7 @@ Source: kolab-syncroton Binary: kolab-syncroton Architecture: all -Version: 2.3.7-0~kolab1 +Version: 2.3.8-0~kolab1 Maintainer: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Uploaders: Paul Klos <kolab@klos2day.nl> Homepage: http://www.kolab.org/ @@ -12,5 +12,5 @@ Package-List: kolab-syncroton deb utils extra Files: - 00000000000000000000000000000000 0 kolab-syncroton-2.3.7.tar.gz + 00000000000000000000000000000000 0 kolab-syncroton-2.3.8.tar.gz 00000000000000000000000000000000 0 debian.tar.gz
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.