From 722c813909ae0af4c9dc2fa6fbc70832a9f2f534 Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Tue, 4 Jul 2017 09:57:05 -0400 Subject: [PATCH] (fix) respect disabled state of sending rate-limiting (fixes #4198) --- SoObjects/SOGo/SOGoSystemDefaults.m | 18 ++++++++++++++++-- UI/MailerUI/UIxMailEditor.m | 2 +- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/SoObjects/SOGo/SOGoSystemDefaults.m b/SoObjects/SOGo/SOGoSystemDefaults.m index 161083553..a508fe0b5 100644 --- a/SoObjects/SOGo/SOGoSystemDefaults.m +++ b/SoObjects/SOGo/SOGoSystemDefaults.m @@ -578,12 +578,26 @@ _injectConfigurationFromFile (NSMutableDictionary *defaultsDict, // - (int) maximumMessageSubmissionCount { - return [self integerForKey: @"SOGoMaximumMessageSubmissionCount"]; + NSUInteger v; + + v = [self integerForKey: @"SOGoMaximumMessageSubmissionCount"]; + + if (!v) + return NSUIntegerMax; + + return v; } - (int) maximumRecipientCount { - return [self integerForKey: @"SOGoMaximumRecipientCount"]; + NSUInteger v; + + v = [self integerForKey: @"SOGoMaximumRecipientCount"]; + + if (!v) + return NSUIntegerMax; + + return v; } - (int) maximumSubmissionInterval diff --git a/UI/MailerUI/UIxMailEditor.m b/UI/MailerUI/UIxMailEditor.m index ff09ab9c1..80cd297de 100644 --- a/UI/MailerUI/UIxMailEditor.m +++ b/UI/MailerUI/UIxMailEditor.m @@ -753,7 +753,7 @@ static NSArray *infoKeys = nil; NSDictionary *messageSubmissions; SOGoSystemDefaults *dd; - int messages_count, recipients_count; + NSUInteger messages_count, recipients_count; messageSubmissions = [[SOGoCache sharedCache] messageSubmissionsCountForLogin: [[context activeUser] login]]; dd = [SOGoSystemDefaults sharedSystemDefaults];