diff --git a/ChangeLog b/ChangeLog index 553d97000..4ac16041c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,11 @@ 2010-04-02 Wolfgang Sourdeau + * SoObjects/Mailer/SOGoMailAccount.m (-updateFilters): we ensure + the active script is deactivated so that we can delete it on + Dovecot. This enables scripts to be deleted when all the filters + are disabled. + * UI/Scheduler/UIxCalListingActions.m (_fillFreeBusy:forUid:fromDate:): fixed a crash occuring when the length of an event would happen after the period covered by the diff --git a/SOPE/sope-patchset-r1664.diff b/SOPE/sope-patchset-r1664.diff index 495f76e6b..96997e611 100644 --- a/SOPE/sope-patchset-r1664.diff +++ b/SOPE/sope-patchset-r1664.diff @@ -1592,7 +1592,13 @@ Index: sope-mime/NGImap4/NGSieveClient.m map = [self processCommand:s]; return [self normalizeResponse:map]; } -@@ -436,7 +438,7 @@ +@@ -431,12 +433,12 @@ + - (NSDictionary *)setActiveScript:(NSString *)_name { + NGHashMap *map; + +- if (![self isValidScriptName:_name]) { ++ if (!_name) { + NSLog(@"%s: missing script-name", __PRETTY_FUNCTION__); return nil; } map = [self processCommand: @@ -3058,12 +3064,14 @@ Index: sope-mime/NGImap4/ChangeLog =================================================================== --- sope-mime/NGImap4/ChangeLog (revision 1664) +++ sope-mime/NGImap4/ChangeLog (working copy) -@@ -1,3 +1,156 @@ +@@ -1,3 +1,158 @@ +2010-04-02 Wolfgang Sourdeau + + * NGSieveClient.m (-putScript:script:): -+ (-setActiveScript, -deleteScript:): do not append an ending "\r\n" ++ (-setActiveScript:, -deleteScript:): do not append an ending "\r\n" + since sendCommand:logText: does it for us. ++ (-setActiveScript:): we accept an empty non-nil script name as ++ argument in order to deactivate the currently active script. + +2010-03-11 Wolfgang Sourdeau + diff --git a/SoObjects/Mailer/SOGoMailAccount.m b/SoObjects/Mailer/SOGoMailAccount.m index 9455f42d9..ea025a45e 100644 --- a/SoObjects/Mailer/SOGoMailAccount.m +++ b/SoObjects/Mailer/SOGoMailAccount.m @@ -373,6 +373,9 @@ static NSString *sieveScriptName = @"sogo"; return NO; } + /* We ensure to deactive the current active script since it could prevent + its deletion from the server. */ + result = [client setActiveScript: @""]; // We delete the existing Sieve script result = [client deleteScript: sieveScriptName];