diff --git a/ActiveSync/SOGoActiveSyncDispatcher+Sync.m b/ActiveSync/SOGoActiveSyncDispatcher+Sync.m index 2a2382ffa..396c2668a 100644 --- a/ActiveSync/SOGoActiveSyncDispatcher+Sync.m +++ b/ActiveSync/SOGoActiveSyncDispatcher+Sync.m @@ -767,7 +767,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. NSMutableString *changeBuffer, *commandsBuffer; BOOL getChanges, first_sync; - unsigned int windowSize; + unsigned int windowSize, v; changeBuffer = [NSMutableString string]; commandsBuffer = [NSMutableString string]; @@ -783,6 +783,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. if (windowSize == 0 || windowSize > 512) windowSize = 100; + + // We check if we must overwrite the windowSize with a system preference. This can be useful + // if the user population has large mailboxes and slow connectivity + if ((v = [[SOGoSystemDefaults sharedSystemDefaults] maximumSyncWindowSize])) + windowSize = v; lastServerKey = nil; diff --git a/Documentation/SOGo Installation Guide.odt b/Documentation/SOGo Installation Guide.odt index 87fef43a0..b6bb0afb8 100644 Binary files a/Documentation/SOGo Installation Guide.odt and b/Documentation/SOGo Installation Guide.odt differ diff --git a/NEWS b/NEWS index 28a1d133a..82c7f5bfa 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,8 @@ Enhancements - now able to emails to address book on send (#1496) - Sieve folder encoding is now configurable (#2622) - SOGo version is now displayed in preferences window (#2612) + - added the SOGoMaximumSyncWindowSize system default to overwrite the + maximum number of items returned during an ActiveSync sync operation Bug fixes - fixed saved HTML content of draft when attaching a file diff --git a/SoObjects/SOGo/SOGoSystemDefaults.h b/SoObjects/SOGo/SOGoSystemDefaults.h index 953e799db..bf6032c9b 100644 --- a/SoObjects/SOGo/SOGoSystemDefaults.h +++ b/SoObjects/SOGo/SOGoSystemDefaults.h @@ -96,6 +96,7 @@ - (int) maximumPingInterval; - (int) maximumSyncInterval; - (int) internalSyncInterval; +- (int) maximumSyncWindowSize; @end diff --git a/SoObjects/SOGo/SOGoSystemDefaults.m b/SoObjects/SOGo/SOGoSystemDefaults.m index aa89c0c88..01150e287 100644 --- a/SoObjects/SOGo/SOGoSystemDefaults.m +++ b/SoObjects/SOGo/SOGoSystemDefaults.m @@ -621,4 +621,9 @@ _injectConfigurationFromFile (NSMutableDictionary *defaultsDict, return v; } +- (int) maximumSyncWindowSize +{ + return [self integerForKey: @"SOGoMaximumSyncWindowSize"]; +} + @end