aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-06-28 00:04:57 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:42:34 +0800
commitadc1173159d4d5d953340f8f3c813681007de524 (patch)
tree8a0bfc8e9a11e3489f4def2bbb7fe0a4bd645aa2 /mail
parent8894b72f2045388990b5696f3e8db97b9544ccf4 (diff)
downloadgsoc2013-evolution-adc1173159d4d5d953340f8f3c813681007de524.tar
gsoc2013-evolution-adc1173159d4d5d953340f8f3c813681007de524.tar.gz
gsoc2013-evolution-adc1173159d4d5d953340f8f3c813681007de524.tar.bz2
gsoc2013-evolution-adc1173159d4d5d953340f8f3c813681007de524.tar.lz
gsoc2013-evolution-adc1173159d4d5d953340f8f3c813681007de524.tar.xz
gsoc2013-evolution-adc1173159d4d5d953340f8f3c813681007de524.tar.zst
gsoc2013-evolution-adc1173159d4d5d953340f8f3c813681007de524.zip
Check for cancelled GIO operation error code too
Diffstat (limited to 'mail')
-rw-r--r--mail/em-utils.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/mail/em-utils.c b/mail/em-utils.c
index db6bd958f9..3239b87214 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -1654,7 +1654,8 @@ search_address_in_addressbooks (const gchar *address,
book_client = e_book_client_new (source, &err);
if (book_client == NULL) {
- if (err && g_error_matches (err, E_CLIENT_ERROR, E_CLIENT_ERROR_CANCELLED)) {
+ if (err && (g_error_matches (err, E_CLIENT_ERROR, E_CLIENT_ERROR_CANCELLED) ||
+ g_error_matches (err, G_IO_ERROR, G_IO_ERROR_CANCELLED))) {
stop = TRUE;
} else if (err) {
gchar *source_uid;
@@ -1677,7 +1678,8 @@ search_address_in_addressbooks (const gchar *address,
g_object_unref (book_client);
book_client = NULL;
- if (err && g_error_matches (err, E_CLIENT_ERROR, E_CLIENT_ERROR_CANCELLED)) {
+ if (err && (g_error_matches (err, E_CLIENT_ERROR, E_CLIENT_ERROR_CANCELLED) ||
+ g_error_matches (err, G_IO_ERROR, G_IO_ERROR_CANCELLED))) {
stop = TRUE;
} else if (err) {
gchar *source_uid;
@@ -1724,8 +1726,9 @@ search_address_in_addressbooks (const gchar *address,
g_slist_free (contacts);
}
} else if (book_client) {
- stop = stop || (err && g_error_matches (
- err, E_CLIENT_ERROR, E_CLIENT_ERROR_CANCELLED));
+ stop = stop || (err &&
+ (g_error_matches (err, E_CLIENT_ERROR, E_CLIENT_ERROR_CANCELLED) ||
+ g_error_matches (err, G_IO_ERROR, G_IO_ERROR_CANCELLED)));
if (err && !stop) {
gchar *source_uid = g_strdup (e_source_peek_uid (source));