aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-tools.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/mail-tools.c')
-rw-r--r--mail/mail-tools.c64
1 files changed, 28 insertions, 36 deletions
diff --git a/mail/mail-tools.c b/mail/mail-tools.c
index 2d10411f91..97bc4259af 100644
--- a/mail/mail-tools.c
+++ b/mail/mail-tools.c
@@ -101,12 +101,13 @@ mail_tool_get_folder_from_urlname (const gchar *url, const gchar *name,
return NULL;
}
- camel_service_connect (CAMEL_SERVICE (store), ex);
- if (camel_exception_is_set (ex)) {
- camel_object_unref (CAMEL_OBJECT (store));
- mail_tool_camel_lock_down();
- return NULL;
- }
+ /*camel_service_connect (CAMEL_SERVICE (store), ex);
+ *if (camel_exception_is_set (ex)) {
+ * camel_object_unref (CAMEL_OBJECT (store));
+ * mail_tool_camel_lock_down();
+ * return NULL;
+ *}
+ */
folder = camel_store_get_folder (store, name, create, ex);
camel_object_unref (CAMEL_OBJECT (store));
@@ -392,14 +393,16 @@ mail_tool_send_via_transport (CamelTransport *transport, CamelMedium *medium, Ca
{
mail_tool_camel_lock_up();
- camel_service_connect (CAMEL_SERVICE (transport), ex);
+ /*camel_service_connect (CAMEL_SERVICE (transport), ex);*/
+
if (camel_exception_is_set (ex))
goto cleanup;
camel_transport_send (transport, medium, ex);
- camel_service_disconnect (CAMEL_SERVICE (transport),
- camel_exception_is_set (ex) ? NULL : ex);
+ /*camel_service_disconnect (CAMEL_SERVICE (transport),
+ *camel_exception_is_set (ex) ? NULL : ex);*/
+
cleanup:
mail_tool_camel_lock_down();
}
@@ -503,6 +506,7 @@ mail_tool_filter_contents_into (CamelFolder *source, CamelFolder *dest,
gchar *systemrules;
FilterContext *fc;
FilterDriver *filter;
+ gchar *unlink;
userrules = g_strdup_printf ("%s/filters.xml", evolution_dir);
systemrules = g_strdup_printf ("%s/evolution/filtertypes.xml", EVOLUTION_DATADIR);
@@ -517,29 +521,16 @@ mail_tool_filter_contents_into (CamelFolder *source, CamelFolder *dest,
camel_object_hook_event (CAMEL_OBJECT (dest), "folder_changed",
hook_func, hook_data);
- filter_driver_run (filter, source, dest, FILTER_SOURCE_INCOMING,
- TRUE, hook_func, hook_data);
-
- camel_folder_sync (CAMEL_FOLDER (source), TRUE, ex);
- camel_folder_sync (CAMEL_FOLDER (dest), TRUE, ex);
-
- if (delete_source) {
- gchar *path = mail_tool_get_local_movemail_path();
- struct stat sb;
-
- if (stat (path, &sb) < 0) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Couldn't stat(2) movemail folder %s"),
- path);
- g_free (path);
- return;
- }
+ if (delete_source)
+ unlink = mail_tool_get_local_movemail_path();
+ else
+ unlink = NULL;
- if (sb.st_size == 0)
- unlink (path);
+ filter_driver_run (filter, source, dest, FILTER_SOURCE_INCOMING,
+ TRUE, hook_func, hook_data, unlink);
- g_free (path);
- }
+ if (unlink)
+ g_free (unlink);
}
CamelFolder *
@@ -556,12 +547,13 @@ mail_tool_get_root_of_store (const char *source_uri, CamelException *ex)
return NULL;
}
- camel_service_connect (CAMEL_SERVICE (store), ex);
- if (camel_exception_is_set (ex)) {
- camel_object_unref (CAMEL_OBJECT (store));
- mail_tool_camel_lock_down();
- return NULL;
- }
+ /*camel_service_connect (CAMEL_SERVICE (store), ex);
+ *if (camel_exception_is_set (ex)) {
+ * camel_object_unref (CAMEL_OBJECT (store));
+ * mail_tool_camel_lock_down();
+ * return NULL;
+ *}
+ */
folder = camel_store_get_root_folder (store, ex);
camel_object_unref (CAMEL_OBJECT (store));