aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-tools.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-08-13 05:59:41 +0800
committerDan Winship <danw@src.gnome.org>2000-08-13 05:59:41 +0800
commit6d313c9f852aa608b6e841e2ae42ab345cf6bc4b (patch)
treee5e597131cdc2763ecba35debe75a3ac92084053 /mail/mail-tools.c
parentb6210c151d6519a299531d6783d1f29b95eb45e0 (diff)
downloadgsoc2013-evolution-6d313c9f852aa608b6e841e2ae42ab345cf6bc4b.tar.gz
gsoc2013-evolution-6d313c9f852aa608b6e841e2ae42ab345cf6bc4b.tar.zst
gsoc2013-evolution-6d313c9f852aa608b6e841e2ae42ab345cf6bc4b.zip
Don't ref the store returned from camel_session_get_store. It's already
* mail-tools.c (mail_tool_get_folder_from_urlname): Don't ref the store returned from camel_session_get_store. It's already reffed. (mail_tool_get_root_of_store): Ditto. (mail_tool_send_via_transport): Remove some commented-out code and fix it to not leave the transport connected if sending fails. svn path=/trunk/; revision=4783
Diffstat (limited to 'mail/mail-tools.c')
-rw-r--r--mail/mail-tools.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/mail/mail-tools.c b/mail/mail-tools.c
index d335416885..9e047ab3fb 100644
--- a/mail/mail-tools.c
+++ b/mail/mail-tools.c
@@ -101,8 +101,6 @@ mail_tool_get_folder_from_urlname (const gchar *url, const gchar *name,
return NULL;
}
- camel_object_ref (CAMEL_OBJECT (store));
-
camel_service_connect (CAMEL_SERVICE (store), ex);
if (camel_exception_is_set (ex)) {
camel_object_unref (CAMEL_OBJECT (store));
@@ -393,24 +391,16 @@ void
mail_tool_send_via_transport (CamelTransport *transport, CamelMedium *medium, CamelException *ex)
{
mail_tool_camel_lock_up();
- /*camel_object_ref (CAMEL_OBJECT (transport));*/
- /*camel_object_ref (CAMEL_OBJECT (medium));*/
camel_service_connect (CAMEL_SERVICE (transport), ex);
-
if (camel_exception_is_set (ex))
goto cleanup;
camel_transport_send (transport, medium, ex);
- if (camel_exception_is_set (ex))
- goto cleanup;
-
- camel_service_disconnect (CAMEL_SERVICE (transport), ex);
-
+ camel_service_disconnect (CAMEL_SERVICE (transport),
+ camel_exception_is_set (ex) ? NULL : ex);
cleanup:
- /*camel_object_unref (CAMEL_OBJECT (medium));*/
- /*camel_object_unref (CAMEL_OBJECT (transport));*/
mail_tool_camel_lock_down();
}
@@ -564,8 +554,6 @@ mail_tool_get_root_of_store (const char *source_uri, CamelException *ex)
return NULL;
}
- camel_object_ref (CAMEL_OBJECT (store));
-
camel_service_connect (CAMEL_SERVICE (store), ex);
if (camel_exception_is_set (ex)) {
camel_object_unref (CAMEL_OBJECT (store));