Added new configuration parameter to limit the window size

pull/34/head
Ludovic Marcotte 2014-04-09 20:12:19 -04:00
parent 5739356f88
commit 0d1c39ca71
5 changed files with 14 additions and 1 deletions

View File

@ -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;

2
NEWS
View File

@ -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

View File

@ -96,6 +96,7 @@
- (int) maximumPingInterval;
- (int) maximumSyncInterval;
- (int) internalSyncInterval;
- (int) maximumSyncWindowSize;
@end

View File

@ -621,4 +621,9 @@ _injectConfigurationFromFile (NSMutableDictionary *defaultsDict,
return v;
}
- (int) maximumSyncWindowSize
{
return [self integerForKey: @"SOGoMaximumSyncWindowSize"];
}
@end