From a28ed6652122f68b756e862f3a3be82391730b1b Mon Sep 17 00:00:00 2001 From: helge Date: Mon, 18 Jul 2005 20:16:49 +0000 Subject: [PATCH] improved vCard parsing git-svn-id: http://svn.opengroupware.org/SOGo/trunk@810 d1b88da0-ebda-0310-925b-ed51d893ca5b --- SOGo/SoObjects/Contacts/ChangeLog | 5 +++++ SOGo/SoObjects/Contacts/SOGoContactObject.m | 7 ++++++- SOGo/SoObjects/Contacts/Version | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) 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 -- 2.39.5