Compare commits

...
3 Commits
Author SHA1 Message Date
Hivert Quentin 99b76ec9ca again 2025-03-26 10:42:39 +01:00
Hivert Quentin 5d0ee3f49b cast correct type 2025-03-26 09:59:47 +01:00
Hivert Quentin ecfc54a0af add logs 2025-03-26 09:26:35 +01:00
2 changed files with 25 additions and 9 deletions

No files matched your search

+19 -9
View File
@@ -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])
{
+6
View File
@@ -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;
}