From 9dcdca57cd3763bfbb555f3a2307f2df225ca239 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Mon, 9 Feb 2009 21:16:36 +0000 Subject: [PATCH] Monotone-Parent: f0542255e31c3d8ac8c2d9b48083294de7e0308c Monotone-Revision: 06def9332cbc52ec43917206f7800e487623419f Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-02-09T21:16:36 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 7 ++++ SoObjects/Contacts/SOGoContactLDAPFolder.m | 45 ++++++++++++---------- 2 files changed, 31 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index e0f8e7f48..0369886d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-02-09 Wolfgang Sourdeau + + * SoObjects/Contacts/SOGoContactLDAPFolder.m + ([SOGoContactLDAPFolder + -appendObject:objectwithBaseURL:baseURLtoREPORTResponse:r]): don't + lookup the returned object if its c_name has no length. + 2009-02-06 Wolfgang Sourdeau * SoObjects/Appointments/SOGoAppointmentFolder.m diff --git a/SoObjects/Contacts/SOGoContactLDAPFolder.m b/SoObjects/Contacts/SOGoContactLDAPFolder.m index 21a69bc4a..c7a406541 100644 --- a/SoObjects/Contacts/SOGoContactLDAPFolder.m +++ b/SoObjects/Contacts/SOGoContactLDAPFolder.m @@ -57,29 +57,32 @@ NSString *name, *etagLine, *contactString; name = [object objectForKey: @"c_name"]; - component = [self lookupName: name inContext: context acquire: NO]; + if ([name length]) + { + component = [self lookupName: name inContext: context acquire: NO]; - [r appendContentString: @" \r\n"]; - [r appendContentString: @" "]; - [r appendContentString: baseURL]; - if (![baseURL hasSuffix: @"/"]) - [r appendContentString: @"/"]; - [r appendContentString: name]; - [r appendContentString: @"\r\n"]; + [r appendContentString: @" \r\n"]; + [r appendContentString: @" "]; + [r appendContentString: baseURL]; + if (![baseURL hasSuffix: @"/"]) + [r appendContentString: @"/"]; + [r appendContentString: name]; + [r appendContentString: @"\r\n"]; - [r appendContentString: @" \r\n"]; - [r appendContentString: @" \r\n"]; - etagLine = [NSString stringWithFormat: @" %@\r\n", - [component davEntityTag]]; - [r appendContentString: etagLine]; - [r appendContentString: @" \r\n"]; - [r appendContentString: @" HTTP/1.1 200 OK\r\n"]; - [r appendContentString: @" \r\n"]; - [r appendContentString: @" "]; - contactString = [[component contentAsString] stringByEscapingXMLString]; - [r appendContentString: contactString]; - [r appendContentString: @"\r\n"]; - [r appendContentString: @" \r\n"]; + [r appendContentString: @" \r\n"]; + [r appendContentString: @" \r\n"]; + etagLine = [NSString stringWithFormat: @" %@\r\n", + [component davEntityTag]]; + [r appendContentString: etagLine]; + [r appendContentString: @" \r\n"]; + [r appendContentString: @" HTTP/1.1 200 OK\r\n"]; + [r appendContentString: @" \r\n"]; + [r appendContentString: @" "]; + contactString = [[component contentAsString] stringByEscapingXMLString]; + [r appendContentString: contactString]; + [r appendContentString: @"\r\n"]; + [r appendContentString: @" \r\n"]; + } } + (id) folderWithName: (NSString *) aName