From: helge Date: Fri, 3 Dec 2004 21:41:54 +0000 (+0000) Subject: fixed an issue with missing Sieve scripts X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c58ecec21f614ff0a2ca26de8440137ddc24ad1c;p=sope fixed an issue with missing Sieve scripts git-svn-id: http://svn.opengroupware.org/SOPE/trunk@427 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- diff --git a/sope-mime/ChangeLog b/sope-mime/ChangeLog index 57ba72f1..35a55a53 100644 --- a/sope-mime/ChangeLog +++ b/sope-mime/ChangeLog @@ -1,3 +1,7 @@ +2004-12-03 Helge Hess + + * NGImap4: fixed an error handler in the Sieve client (v4.5.203) + 2004-11-30 Helge Hess * NGMail: fixed a bug in NGSendMail (v4.5.202) diff --git a/sope-mime/NGImap4/ChangeLog b/sope-mime/NGImap4/ChangeLog index 502f05d7..1d7ec86c 100644 --- a/sope-mime/NGImap4/ChangeLog +++ b/sope-mime/NGImap4/ChangeLog @@ -1,3 +1,7 @@ +2004-12-03 Helge Hess + + * NGSieveClient.m: fixed error processing on missing scripts + 2004-11-28 Helge Hess * NGSieveClient.m: can init using a URL, prepared some parsing methods, diff --git a/sope-mime/NGImap4/NGSieveClient.m b/sope-mime/NGImap4/NGSieveClient.m index 182b7324..e1bc357c 100644 --- a/sope-mime/NGImap4/NGSieveClient.m +++ b/sope-mime/NGImap4/NGSieveClient.m @@ -365,6 +365,16 @@ static BOOL debugImap4 = NO; if ((script = [[self readString] autorelease]) == nil) return nil; + if ([script hasPrefix:@"O "] || [script hasPrefix:@"NO "]) { + // TODO: not exactly correct, script could begin with this signature + // Note: readString read 'NO ...', but the first char is consumed + + [self logWithFormat:@"ERROR: status line reports: '%@'", script]; + return nil; + } + + NSLog(@"str: %@", script); + /* read response code */ if ((s = [self readStringToCRLF]) == nil) { @@ -829,7 +839,8 @@ static BOOL debugImap4 = NO; return [self readQuoted]; if (c1 == '{') return [self readLiteral]; - + + // Note: this does not return the first char! return [self readStringToCRLF]; } diff --git a/sope-mime/Version b/sope-mime/Version index 7b780dd4..1b20d963 100644 --- a/sope-mime/Version +++ b/sope-mime/Version @@ -2,6 +2,6 @@ MAJOR_VERSION:=4 MINOR_VERSION:=5 -SUBMINOR_VERSION:=202 +SUBMINOR_VERSION:=203 # v4.2.149 requires libNGStreams v4.2.34