From: helge Date: Mon, 18 Jul 2005 20:16:49 +0000 (+0000) Subject: improved vCard parsing X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a28ed6652122f68b756e862f3a3be82391730b1b;p=scalable-opengroupware.org improved vCard parsing git-svn-id: http://svn.opengroupware.org/SOGo/trunk@810 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/SOGo/SoObjects/Contacts/ChangeLog b/SOGo/SoObjects/Contacts/ChangeLog index 9896637a..3fa16329 100644 --- a/SOGo/SoObjects/Contacts/ChangeLog +++ b/SOGo/SoObjects/Contacts/ChangeLog @@ -1,3 +1,8 @@ +2005-07-18 Helge Hess + + * SOGoContactObject.m: print an error log if a vCard could not be + parsed, cached failed parsing attempts (v0.9.14) + 2005-07-15 Helge Hess * SOGoContactFolder.m: fixed a gcc 4.0 warning (v0.9.13) diff --git a/SOGo/SoObjects/Contacts/SOGoContactObject.m b/SOGo/SoObjects/Contacts/SOGoContactObject.m index 9092b2a2..05f05fb6 100644 --- a/SOGo/SoObjects/Contacts/SOGoContactObject.m +++ b/SOGo/SoObjects/Contacts/SOGoContactObject.m @@ -42,13 +42,18 @@ NSArray *v; v = [NGVCard parseVCardsFromSource:s]; - if ([v count] == 0) + if ([v count] == 0) { + [self errorWithFormat:@"Could not parse vCards from content!"]; return nil; + } self->record = [[v objectAtIndex:0] retain]; } else self->record = [[s propertyList] copy]; + + if (self->record == nil) + self->record = [[NSNull null] retain]; } return [self->record isNotNull] ? self->record : nil; } diff --git a/SOGo/SoObjects/Contacts/Version b/SOGo/SoObjects/Contacts/Version index fd6a9b55..756a577e 100644 --- a/SOGo/SoObjects/Contacts/Version +++ b/SOGo/SoObjects/Contacts/Version @@ -1,6 +1,6 @@ # version file -SUBMINOR_VERSION:=13 +SUBMINOR_VERSION:=14 # v0.9.12 requires libSOGo v0.9.54 # v0.9.9 requires libGDLContentStore v4.5.26