diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-09-28 04:20:08 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-09-28 04:20:08 +0800 |
commit | 7ed66fac42704097175f778660e391e86cc6d55d (patch) | |
tree | f77d33fb9bec1c329e30075b46aa19354156c76f /camel/providers/imap/camel-imap-store.c | |
parent | 5960e962688cb6ff5cd04b1391365469da42efaf (diff) | |
download | gsoc2013-evolution-7ed66fac42704097175f778660e391e86cc6d55d.tar gsoc2013-evolution-7ed66fac42704097175f778660e391e86cc6d55d.tar.gz gsoc2013-evolution-7ed66fac42704097175f778660e391e86cc6d55d.tar.bz2 gsoc2013-evolution-7ed66fac42704097175f778660e391e86cc6d55d.tar.lz gsoc2013-evolution-7ed66fac42704097175f778660e391e86cc6d55d.tar.xz gsoc2013-evolution-7ed66fac42704097175f778660e391e86cc6d55d.tar.zst gsoc2013-evolution-7ed66fac42704097175f778660e391e86cc6d55d.zip |
New function to decode the INTERNALDATE response from an IMAP server so we
2002-09-27 Jeffrey Stedfast <fejj@ximian.com>
* providers/imap/camel-imap-folder.c (decode_internaldate): New
function to decode the INTERNALDATE response from an IMAP server
so we don't have to use my broken-date-parser routines.
2002-09-27 Jeffrey Stedfast <fejj@ximian.com>
* providers/imap/camel-imap-store.c (connect_to_server):
NULL-check the streams before unreffing them in the case of a
failure during ssl negotiations.
* camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_enable_ssl): Check
SSL_ResetHandshake() for errors. Also force a handshake after
we've reset the handshake state on the socket.
svn path=/trunk/; revision=18252
Diffstat (limited to 'camel/providers/imap/camel-imap-store.c')
-rw-r--r-- | camel/providers/imap/camel-imap-store.c | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c index fbc1e20555..f854d78a11 100644 --- a/camel/providers/imap/camel-imap-store.c +++ b/camel/providers/imap/camel-imap-store.c @@ -528,7 +528,7 @@ imap_get_capability (CamelService *service, CamelException *ex) g_free (result); imap_set_server_level (store); - + if (store->summary->capabilities != store->capabilities) { store->summary->capabilities = store->capabilities; camel_store_summary_touch((CamelStoreSummary *)store->summary); @@ -682,27 +682,43 @@ connect_to_server (CamelService *service, int ssl_mode, int try_starttls, CamelE /* rfc2595, section 4 states that after a successful STLS command, the client MUST discard prior CAPA responses */ if (!imap_get_capability (service, ex)) { - camel_object_unref (CAMEL_OBJECT (store->istream)); - camel_object_unref (CAMEL_OBJECT (store->ostream)); - store->istream = NULL; - store->ostream = NULL; + if (store->istream) { + camel_object_unref (CAMEL_OBJECT (store->istream)); + store->istream = NULL; + } + + if (store->ostream) { + camel_object_unref (CAMEL_OBJECT (store->ostream)); + store->ostream = NULL; + } + + store->connected = FALSE; + return FALSE; } return TRUE; exception: - if (clean_quit) { + + if (clean_quit && store->connected) { /* try to disconnect cleanly */ response = camel_imap_command (store, NULL, ex, "LOGOUT"); if (response) camel_imap_response_free_without_processing (store, response); } - camel_object_unref (CAMEL_OBJECT (store->istream)); - camel_object_unref (CAMEL_OBJECT (store->ostream)); - store->istream = NULL; - store->ostream = NULL; + if (store->istream) { + camel_object_unref (CAMEL_OBJECT (store->istream)); + store->istream = NULL; + } + + if (store->ostream) { + camel_object_unref (CAMEL_OBJECT (store->ostream)); + store->ostream = NULL; + } + + store->connected = FALSE; return FALSE; #endif /* HAVE_SSL */ |