diff options
author | Dan Winship <danw@src.gnome.org> | 2000-08-13 05:59:41 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2000-08-13 05:59:41 +0800 |
commit | 6d313c9f852aa608b6e841e2ae42ab345cf6bc4b (patch) | |
tree | e5e597131cdc2763ecba35debe75a3ac92084053 | |
parent | b6210c151d6519a299531d6783d1f29b95eb45e0 (diff) | |
download | gsoc2013-evolution-6d313c9f852aa608b6e841e2ae42ab345cf6bc4b.tar gsoc2013-evolution-6d313c9f852aa608b6e841e2ae42ab345cf6bc4b.tar.gz gsoc2013-evolution-6d313c9f852aa608b6e841e2ae42ab345cf6bc4b.tar.bz2 gsoc2013-evolution-6d313c9f852aa608b6e841e2ae42ab345cf6bc4b.tar.lz gsoc2013-evolution-6d313c9f852aa608b6e841e2ae42ab345cf6bc4b.tar.xz 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
-rw-r--r-- | mail/ChangeLog | 6 | ||||
-rw-r--r-- | mail/mail-tools.c | 16 |
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)); |