aboutsummaryrefslogtreecommitdiffstats
path: root/mail/importers
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-07-01 12:07:26 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-08-13 23:27:51 +0800
commitf59681796df8fe0138a1754abbe8ec781bc1535e (patch)
tree0ced0c119ffed095713d7f64732686df9b2d9152 /mail/importers
parentbf4a1a13e3295deefc4031a446627ff9b1c95c7a (diff)
downloadgsoc2013-evolution-f59681796df8fe0138a1754abbe8ec781bc1535e.tar
gsoc2013-evolution-f59681796df8fe0138a1754abbe8ec781bc1535e.tar.gz
gsoc2013-evolution-f59681796df8fe0138a1754abbe8ec781bc1535e.tar.bz2
gsoc2013-evolution-f59681796df8fe0138a1754abbe8ec781bc1535e.tar.lz
gsoc2013-evolution-f59681796df8fe0138a1754abbe8ec781bc1535e.tar.xz
gsoc2013-evolution-f59681796df8fe0138a1754abbe8ec781bc1535e.tar.zst
gsoc2013-evolution-f59681796df8fe0138a1754abbe8ec781bc1535e.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'mail/importers')
-rw-r--r--mail/importers/pine-importer.c31
1 files changed, 19 insertions, 12 deletions
diff --git a/mail/importers/pine-importer.c b/mail/importers/pine-importer.c
index c75a78a332..9be96ba182 100644
--- a/mail/importers/pine-importer.c
+++ b/mail/importers/pine-importer.c
@@ -153,11 +153,14 @@ import_contact (EBookClient *book_client, gchar *line)
if (strings[3] && strings[4])
e_contact_set (card, E_CONTACT_NOTE, strings[4]);
- if (!e_book_client_add_contact_sync (book_client, card, &new_uid, NULL, &error)) {
- g_debug ("%s: Failed to add contact: %s", G_STRFUNC, error ? error->message : "Unknown error");
- if (error)
- g_error_free (error);
- error = NULL;
+ e_book_client_add_contact_sync (
+ book_client, card, &new_uid, NULL, &error);
+
+ if (error != NULL) {
+ g_error (
+ "%s: Failed to add contact: %s",
+ G_STRFUNC, error->message);
+ g_error_free (error);
} else {
g_free (new_uid);
}
@@ -181,11 +184,13 @@ import_contacts (void)
printf("importing pine addressbook\n");
- if (!e_book_client_get_sources (&source_list, &error)) {
- if (error) {
- g_debug ("%s: Failed to get book sources: %s", G_STRFUNC, error->message);
- g_error_free (error);
- }
+ e_book_client_get_sources (&source_list, &error);
+
+ if (error != NULL) {
+ g_warning (
+ "%s: Failed to get book sources: %s",
+ G_STRFUNC, error->message);
+ g_error_free (error);
return;
}
@@ -199,7 +204,7 @@ import_contacts (void)
/* FIXME Better error handling */
if ((book_client = e_book_client_new (primary, &error)) == NULL) {
fclose (fp);
- g_warning ("Could not create EBook: %s", error ? error->message : "Unknown error");
+ g_warning ("Could not create EBook: %s", error->message);
if (error)
g_error_free (error);
return;
@@ -210,7 +215,9 @@ import_contacts (void)
g_object_unref (source_list);
fclose (fp);
- g_warning ("%s: Failed to open book client: %s", G_STRFUNC, error ? error->message : "Unknown error");
+ g_warning (
+ "%s: Failed to open book client: %s",
+ G_STRFUNC, error->message);
if (error)
g_error_free (error);
return;