aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--addressbook/ChangeLog9
-rw-r--r--addressbook/gui/component/addressbook-migrate.c22
2 files changed, 25 insertions, 6 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 7740c27d42..d7463355c5 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,5 +1,14 @@
2007-08-06 Milan Crha <mcrha@redhat.com>
+ ** Partial fix for bug #313221
+
+ * gui/component/addressbook-migrate.c
+ (migrate_contacts), (migrate_company_phone_for_local_folders):
+ changes as part of fixing bug #313221,
+ looping through all param values, not only testing first one
+
+2007-08-06 Milan Crha <mcrha@redhat.com>
+
** Partial fix for bug #427469
* importers/evolution-vcard-importer.c: (vcard_import_contact):
diff --git a/addressbook/gui/component/addressbook-migrate.c b/addressbook/gui/component/addressbook-migrate.c
index 2c9d621bb8..58e27b3cd4 100644
--- a/addressbook/gui/component/addressbook-migrate.c
+++ b/addressbook/gui/component/addressbook-migrate.c
@@ -273,10 +273,14 @@ migrate_contacts (MigrationContext *context, EBook *old_book, EBook *new_book)
EVCardAttributeParam *p = param->data;
if (!strcmp (EVC_TYPE, e_vcard_attribute_param_get_name (p))) {
GList *v = e_vcard_attribute_param_get_values (p);
- if (v && v->data)
+ while (v && v->data) {
if (!strcmp ("VOICE", v->data)
- || !strcmp ("FAX", v->data))
+ || !strcmp ("FAX", v->data)) {
found = TRUE;
+ break;
+ }
+ v = v->next;
+ }
}
}
@@ -297,10 +301,15 @@ migrate_contacts (MigrationContext *context, EBook *old_book, EBook *new_book)
p = param->data;
if (!strcmp (EVC_TYPE, e_vcard_attribute_param_get_name (p))) {
GList *v = e_vcard_attribute_param_get_values (p);
- if (v && v->data && !strcmp ("POSTAL", v->data)) {
- found = TRUE;
- break;
+ while (v && v->data ) {
+ if (!strcmp ("POSTAL", v->data)) {
+ found = TRUE;
+ break;
+ }
+ v = v->next;
}
+ if (found)
+ break;
}
}
@@ -937,11 +946,12 @@ migrate_company_phone_for_local_folders (MigrationContext *context, ESourceGroup
EVCardAttributeParam *p = param->data;
if (!strcmp (EVC_TYPE, e_vcard_attribute_param_get_name (p))) {
GList *v = e_vcard_attribute_param_get_values (p);
- if (v && v->data) {
+ while (v && v->data) {
if (!strcmp ("VOICE", v->data))
found_voice = TRUE;
else if (!strcmp ("WORK", v->data))
found_work = TRUE;
+ v = v->next;
}
}