diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-07-01 12:07:26 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-08-13 23:27:51 +0800 |
commit | f59681796df8fe0138a1754abbe8ec781bc1535e (patch) | |
tree | 0ced0c119ffed095713d7f64732686df9b2d9152 /addressbook/gui/merging/eab-contact-compare.c | |
parent | bf4a1a13e3295deefc4031a446627ff9b1c95c7a (diff) | |
download | gsoc2013-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 'addressbook/gui/merging/eab-contact-compare.c')
-rw-r--r-- | addressbook/gui/merging/eab-contact-compare.c | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/addressbook/gui/merging/eab-contact-compare.c b/addressbook/gui/merging/eab-contact-compare.c index 8295b77e7e..fd6ad8c012 100644 --- a/addressbook/gui/merging/eab-contact-compare.c +++ b/addressbook/gui/merging/eab-contact-compare.c @@ -573,7 +573,9 @@ match_search_info_free (MatchSearchInfo *info) } static void -query_cb (GObject *source_object, GAsyncResult *result, gpointer user_data) +query_cb (GObject *source_object, + GAsyncResult *result, + gpointer user_data) { MatchSearchInfo *info = (MatchSearchInfo *) user_data; EABContactMatchType best_match = EAB_CONTACT_MATCH_NONE; @@ -584,12 +586,21 @@ query_cb (GObject *source_object, GAsyncResult *result, gpointer user_data) GError *error = NULL; const GSList *ii; - if (result && !e_book_client_get_contacts_finish (book_client, result, &contacts, &error)) { - g_debug ("%s: Failed to get contacts: %s\n", G_STRFUNC, error ? error->message : "Unknown error"); - if (error) - g_error_free (error); + if (result != NULL) + e_book_client_get_contacts_finish ( + book_client, result, &contacts, &error); + + if (error != NULL) { + g_warning ( + "%s: Failed to get contacts: %s\n", + G_STRFUNC, error->message); + g_error_free (error); + + info->cb ( + info->contact, NULL, + EAB_CONTACT_MATCH_NONE, + info->closure); - info->cb (info->contact, NULL, EAB_CONTACT_MATCH_NONE, info->closure); match_search_info_free (info); g_object_unref (book_client); return; @@ -751,10 +762,10 @@ book_loaded_cb (GObject *source_object, MatchSearchInfo *info = user_data; EClient *client = NULL; - if (!e_client_utils_open_new_finish (source, result, &client, NULL)) - client = NULL; + e_client_utils_open_new_finish (source, result, &client, NULL); - use_common_book_client (client ? E_BOOK_CLIENT (client): NULL, info); + /* Client may be NULL; don't use a type cast macro. */ + use_common_book_client ((EBookClient *) client, info); } void |