aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--addressbook/ChangeLog6
-rw-r--r--addressbook/conduit/address-conduit.c7
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 <jpr@ximian.com>
+
+ * 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 <clahey@ximian.com>
* 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));
}