From e6ef1f1539d4542e2d66ebdef424ad1eb0fca698 Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Wed, 11 Apr 2001 21:25:23 +0000 Subject: Don't add more than five phone numbers and set the remaining blank entries 2001-04-11 JP Rosevear * conduit/address-conduit.c (local_record_from_ecard): Don't add more than five phone numbers and set the remaining blank entries to some reasonable defaults svn path=/trunk/; revision=9249 --- addressbook/ChangeLog | 6 ++++++ addressbook/conduit/address-conduit.c | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 2c89098e49..8a562a449e 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,9 @@ +2001-04-11 JP Rosevear + + * conduit/address-conduit.c (local_record_from_ecard): Don't add + more than five phone numbers and set the remaining blank entries + to some reasonable defaults + 2001-04-11 Christopher James Lahey * backend/ebook/e-card-simple.h: Added diff --git a/addressbook/conduit/address-conduit.c b/addressbook/conduit/address-conduit.c index 5f6fdab5bb..78db75c99d 100644 --- a/addressbook/conduit/address-conduit.c +++ b/addressbook/conduit/address-conduit.c @@ -372,7 +372,7 @@ local_record_from_ecard (EAddrLocalRecord *local, ECard *ecard, EAddrConduitCont local->addr->entry[entryCountry] = e_pilot_utf8_to_pchar (delivery->country); } - for (i = 0; i <= 7; i++) { + for (i = 0; i <= 7 && phone <= entryPhone5; i++) { const char *phone_str = NULL; char *phonelabel = ctxt->ai.phoneLabels[i]; @@ -397,9 +397,10 @@ local_record_from_ecard (EAddrLocalRecord *local, ECard *ecard, EAddrConduitCont local->addr->entry[phone] = e_pilot_utf8_to_pchar (phone_str); local->addr->phoneLabel[phone - entryPhone1] = i; phone++; - } - + } } + for (; phone <= entryPhone5; phone++) + local->addr->phoneLabel[phone - entryPhone1] = phone - entryPhone1; gtk_object_unref (GTK_OBJECT (simple)); } -- cgit