Skip to content

Commit

Permalink
(fix) respect disabled state of sending rate-limiting (fixes #4198)
Browse files Browse the repository at this point in the history
  • Loading branch information
extrafu committed Jul 4, 2017
1 parent 919d1ef commit 07fa202
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
18 changes: 16 additions & 2 deletions SoObjects/SOGo/SOGoSystemDefaults.m
Expand Up @@ -591,12 +591,26 @@ - (int) maximumMessageSizeLimit
//
- (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
Expand Down
2 changes: 1 addition & 1 deletion UI/MailerUI/UIxMailEditor.m
Expand Up @@ -816,7 +816,7 @@ - (WOResponse *) sendAction
SOGoSystemDefaults *dd;
id <WOActionResults> response;

int messages_count, recipients_count;
NSUInteger messages_count, recipients_count;

messageSubmissions = [[SOGoCache sharedCache] messageSubmissionsCountForLogin: [[context activeUser] login]];
dd = [SOGoSystemDefaults sharedSystemDefaults];
Expand Down

0 comments on commit 07fa202

Please sign in to comment.