[evolution-ews] Make sure we have a connection before appending a message to the camel folder
- From: Or Goshen <ogosh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] Make sure we have a connection before appending a message to the camel folder
- Date: Mon, 11 Jul 2011 09:38:25 +0000 (UTC)
commit b1437b977db67ad768812e0123aadeab3156448a
Author: Or Goshen <orx goshen intel com>
Date: Mon Jul 11 12:47:41 2011 +0300
Make sure we have a connection before appending a message to the camel folder
src/camel/camel-ews-folder.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/camel/camel-ews-folder.c b/src/camel/camel-ews-folder.c
index 2e770f5..7e20fc2 100644
--- a/src/camel/camel-ews-folder.c
+++ b/src/camel/camel-ews-folder.c
@@ -1045,6 +1045,12 @@ ews_append_message_sync (CamelFolder *folder, CamelMimeMessage *message,
cnc = camel_ews_store_get_connection(ews_store);
+ if (!cnc) {
+ g_set_error (error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
+ _("Cant perform actions on the folder while in offline mode"));
+ return FALSE;
+ }
+
if (!camel_ews_utils_create_mime_message (cnc, "SaveOnly", folder_id,
message,
camel_message_info_flags (info),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]