aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog6
-rw-r--r--mail/mail-tools.c16
2 files changed, 8 insertions, 14 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 3ad14af94e..4af8bf32fa 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,11 @@
2000-08-12 Dan Winship <danw@helixcode.com>
+ * 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.
+
* mail-callbacks.c (delete_msg): Toggling a flag is an
"instantaneous" operation, so if we're only doing one, just do it
and return, rather than queueing it for the other thread. This
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));