From: helge Date: Sun, 28 Nov 2004 18:49:32 +0000 (+0000) Subject: minor Sieve cleanups X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25e919e3359a840b85d7ad4f1500127fe5f16187;p=sope minor Sieve cleanups git-svn-id: http://svn.opengroupware.org/SOPE/trunk@422 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- diff --git a/sope-mime/NGImap4/NGSieveClient.m b/sope-mime/NGImap4/NGSieveClient.m index 5d0bc0e0..182b7324 100644 --- a/sope-mime/NGImap4/NGSieveClient.m +++ b/sope-mime/NGImap4/NGSieveClient.m @@ -297,6 +297,12 @@ static BOOL debugImap4 = NO; buf = calloc(bufLen + 2, sizeof(char)); + /* + Format: + authenticate-id + authorize-id + password + */ sprintf(buf, "%s %s %s", [self->login cString], [self->login cString], [self->password cString]); @@ -307,7 +313,7 @@ static BOOL debugImap4 = NO; auth = [NSData dataWithBytesNoCopy:buf length:bufLen]; auth = [auth dataByEncodingBase64]; - if (LOG_PASSWORD == 1) { + if (LOG_PASSWORD) { NSString *s; s = [NSString stringWithFormat:@"AUTHENTICATE \"PLAIN\" {%d+}\r\n%s", diff --git a/sope-mime/samples/sievetool.m b/sope-mime/samples/sievetool.m index 1fde51fa..ce00ec65 100644 --- a/sope-mime/samples/sievetool.m +++ b/sope-mime/samples/sievetool.m @@ -59,7 +59,8 @@ static int test(NSArray *args) { client = [[NGSieveClient alloc] initWithURL:url]; NSLog(@" client: %@", client); - if ((res = [client login:[url user] password:[url password]]) == nil) { + res = [client login:[url user] password:[url password]]; + if (![[res valueForKey:@"result"] boolValue]) { NSLog(@"could not login %@: %@", [url user], client); return 1; }