aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/vcard-inline/vcard-inline.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/vcard-inline/vcard-inline.c')
-rw-r--r--plugins/vcard-inline/vcard-inline.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/plugins/vcard-inline/vcard-inline.c b/plugins/vcard-inline/vcard-inline.c
index 78818f328b..24e551afe9 100644
--- a/plugins/vcard-inline/vcard-inline.c
+++ b/plugins/vcard-inline/vcard-inline.c
@@ -118,23 +118,29 @@ org_gnome_vcard_inline_decode (VCardInlinePObject *vcard_object,
}
static void
-org_gnome_vcard_inline_client_loaded_cb (GObject *source_object, GAsyncResult *result, gpointer user_data)
+org_gnome_vcard_inline_client_loaded_cb (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
+ ESource *source = E_SOURCE (source_object);
EClient *client = NULL;
EBookClient *book_client;
GSList *contact_list = user_data, *iter;
GError *error = NULL;
- if (!e_client_utils_open_new_finish (E_SOURCE (source_object), result, &client, &error))
- client = NULL;
+ e_client_utils_open_new_finish (source, result, &client, &error);
- if (client == NULL) {
- g_debug ("%s: Failed to open book client: %s", G_STRFUNC, error ? error->message : "Unknown error");
- if (error)
- g_error_free (error);
+ if (error != NULL) {
+ g_warn_if_fail (client == NULL);
+ g_warning (
+ "%s: Failed to open book client: %s",
+ G_STRFUNC, error->message);
+ g_error_free (error);
goto exit;
}
+ g_return_if_fail (E_IS_BOOK_CLIENT (client));
+
book_client = E_BOOK_CLIENT (client);
for (iter = contact_list; iter != NULL; iter = iter->next) {