aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/bbdb/bbdb.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-09-08 00:31:19 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-09-08 07:08:54 +0800
commit3da4948c0fc1f2c21b163f0ec456b2d99c881258 (patch)
tree479d6153d31e03cb7a65990683b5271402e5ec29 /plugins/bbdb/bbdb.c
parent2e5031cb4538b4819e5fce5d717668c3445df80a (diff)
downloadgsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar
gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar.gz
gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar.bz2
gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar.lz
gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar.xz
gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar.zst
gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.zip
Miscellaneous cleanups.
Diffstat (limited to 'plugins/bbdb/bbdb.c')
-rw-r--r--plugins/bbdb/bbdb.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/plugins/bbdb/bbdb.c b/plugins/bbdb/bbdb.c
index bfb6959047..31aebceff2 100644
--- a/plugins/bbdb/bbdb.c
+++ b/plugins/bbdb/bbdb.c
@@ -272,7 +272,7 @@ bbdb_do_it (EBookClient *client,
const gchar *name,
const gchar *email)
{
- gchar *query_string, *delim, *temp_name = NULL, *uid;
+ gchar *query_string, *delim, *temp_name = NULL;
GSList *contacts = NULL;
gboolean status;
EContact *contact;
@@ -334,8 +334,14 @@ bbdb_do_it (EBookClient *client,
contact = (EContact *) contacts->data;
add_email_to_contact (contact, email);
- if (!e_book_client_modify_contact_sync (client, contact, NULL, &error)) {
- g_warning ("bbdb: Could not modify contact: %s\n", error->message);
+
+ e_book_client_modify_contact_sync (
+ client, contact, NULL, &error);
+
+ if (error != NULL) {
+ g_warning (
+ "bbdb: Could not modify contact: %s\n",
+ error->message);
g_error_free (error);
}
@@ -350,14 +356,16 @@ bbdb_do_it (EBookClient *client,
add_email_to_contact (contact, email);
g_free (temp_name);
- uid = NULL;
- if (!e_book_client_add_contact_sync (client, contact, &uid, NULL, &error)) {
- g_warning ("bbdb: Failed to add new contact: %s", error->message);
+ e_book_client_add_contact_sync (client, contact, NULL, NULL, &error);
+
+ if (error != NULL) {
+ g_warning (
+ "bbdb: Failed to add new contact: %s",
+ error->message);
g_error_free (error);
}
g_object_unref (contact);
- g_free (uid);
}
EBookClient *