Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
99b76ec9ca | ||
|
|
5d0ee3f49b | ||
|
|
ecfc54a0af |
No files matched your search
@@ -2471,28 +2471,37 @@ void handle_eas_terminate(int signum)
|
||||
[[o properties] setObject: processIdentifier forKey: @"PingRequest"];
|
||||
[o save];
|
||||
|
||||
NSLog(@"EASLOG: processPing, load defaults");
|
||||
defaults = [SOGoSystemDefaults sharedSystemDefaults];
|
||||
defaultInterval = [defaults maximumPingInterval];
|
||||
internalInterval = [defaults internalSyncInterval];
|
||||
sleepInterval = (internalInterval < 5) ? 5 : internalInterval;
|
||||
NSLog(@"EASLOG: processPing, defaults found defaultInterval: %d, internalInterval: %d, sleepInterval: %d", defaultInterval, internalInterval, sleepInterval);
|
||||
|
||||
if (theDocumentElement)
|
||||
{
|
||||
heartbeatInterval = [[[(id)[theDocumentElement getElementsByTagName: @"HeartbeatInterval"] lastObject] textValue] intValue];
|
||||
NSLog(@"EASLOG: processPing, heartbeatInterval found in document: %d", heartbeatInterval);
|
||||
}
|
||||
else
|
||||
{
|
||||
heartbeatInterval = defaultInterval;
|
||||
NSLog(@"EASLOG: processPing, heartbeatInterval NOT found in document: %d", heartbeatInterval);
|
||||
}
|
||||
|
||||
if (heartbeatInterval > defaultInterval || heartbeatInterval == 0)
|
||||
{
|
||||
heartbeatInterval = defaultInterval;
|
||||
status = 5;
|
||||
}
|
||||
{
|
||||
heartbeatInterval = defaultInterval;
|
||||
status = 5;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (heartbeatInterval < internalInterval)
|
||||
heartbeatInterval = internalInterval;
|
||||
{
|
||||
if (heartbeatInterval < internalInterval)
|
||||
heartbeatInterval = internalInterval;
|
||||
|
||||
status = 1;
|
||||
}
|
||||
status = 1;
|
||||
}
|
||||
NSLog(@"EASLOG: processPing, heartbeatInterval final value: %d", heartbeatInterval);
|
||||
|
||||
// We build the list of folders to "ping". When the payload is empty, we use the list
|
||||
// of "cached" folders.
|
||||
@@ -2607,6 +2616,7 @@ void handle_eas_terminate(int signum)
|
||||
{
|
||||
// We check if we must break the current ping request since an other ping request
|
||||
// has just arrived.
|
||||
NSLog(@"EASLOG: processPing, while loop for changes start. total_sleep: %d, internalInterval: %d", total_sleep, internalInterval);
|
||||
pingRequestInCache = [[self globalMetadataForDevice] objectForKey: @"PingRequest"];
|
||||
if (pingRequestInCache && ![pingRequestInCache isEqualToString: processIdentifier])
|
||||
{
|
||||
|
||||
@@ -1025,7 +1025,13 @@ NSComparisonResult languageSort(id el1, id el2, void *context)
|
||||
v = [self integerForKey: @"SOGoInternalSyncInterval"];
|
||||
|
||||
if (!v)
|
||||
{
|
||||
NSLog(@"EASLOG: SOGoInternalSyncInterval didn't find value in conf, go with default 10");
|
||||
v = 10;
|
||||
}
|
||||
else {
|
||||
NSLog(@"EASLOG: SOGoInternalSyncInterval found, value is %d", v);
|
||||
}
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user