From b391953aa488fb176835f1b63605ac39f8d9acca Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 6 Oct 2010 19:47:20 +0000 Subject: [PATCH] Monotone-Parent: 4a2e7b98be9bf00419ec1e19e3bfda5b9b0a9f8f Monotone-Revision: 20ebf3a5a63320cd182175f76e87a294bcbcffa3 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-10-06T19:47:20 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 4 ++++ SoObjects/SOGo/SOGoUser.m | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index d4eaf63c2..9e181cd45 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2010-10-06 Wolfgang Sourdeau + * SoObjects/SOGo/SOGoUser.m (-_appendSystemMailAccount): check + that -[url scheme] and -[url query] are not null before the + comparison, since nil == 0 == NSOrderedSame.... + * OpenChange/MAPIStoreContext.m: (-getMessageTableChildproperty:atURL:withTag:inFolder:withFID:) added response for PR_ROW_TYPE (always 1) and PR_DEPTH (always 0). diff --git a/SoObjects/SOGo/SOGoUser.m b/SoObjects/SOGo/SOGoUser.m index 24547532d..965749b52 100644 --- a/SoObjects/SOGo/SOGoUser.m +++ b/SoObjects/SOGo/SOGoUser.m @@ -502,7 +502,7 @@ - (void) _appendSystemMailAccount { NSString *fullName, *imapLogin, *imapServer, *signature, *encryption, - *scheme, *action; + *scheme, *action, *query; NSMutableDictionary *mailAccount, *identity, *mailboxes, *receipts; NSNumber *port; NSMutableArray *identities; @@ -540,14 +540,16 @@ // 3. port & encryption scheme = [url scheme]; - if ([scheme caseInsensitiveCompare: @"imaps"] == NSOrderedSame) + if (scheme + && [scheme caseInsensitiveCompare: @"imaps"] == NSOrderedSame) { encryption = @"ssl"; defaultPort = 993; } else { - if ([[url query] caseInsensitiveCompare: @"tls=YES"] == NSOrderedSame) + query = [url query]; + if (query && [query caseInsensitiveCompare: @"tls=YES"] == NSOrderedSame) encryption = @"tls"; else encryption = @"none";