From d4db79eeccaea372e8d31c29a572cb143f60f37d Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Mon, 15 Nov 2004 20:15:43 +0000 Subject: In the fallback cases, clear the exception first. 2004-11-15 Jeffrey Stedfast * providers/pop3/camel-pop3-store.c (connect_to_server_wrapper): In the fallback cases, clear the exception first. * providers/imap/camel-imap-store.c (connect_to_server_wrapper): In the fallback cases, clear the exception first. * providers/imap4/camel-imap4-store.c (connect_to_server_wrapper): In the fallback cases, clear the exception first. svn path=/trunk/; revision=27928 --- camel/ChangeLog | 11 +++++++++++ camel/providers/imap/camel-imap-store.c | 7 +++++-- camel/providers/imap4/camel-imap4-store.c | 9 ++++++--- camel/providers/pop3/camel-pop3-store.c | 7 +++++-- 4 files changed, 27 insertions(+), 7 deletions(-) (limited to 'camel') diff --git a/camel/ChangeLog b/camel/ChangeLog index f1d716e425..e90ca8c61c 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,14 @@ +2004-11-15 Jeffrey Stedfast + + * providers/pop3/camel-pop3-store.c (connect_to_server_wrapper): + In the fallback cases, clear the exception first. + + * providers/imap/camel-imap-store.c (connect_to_server_wrapper): + In the fallback cases, clear the exception first. + + * providers/imap4/camel-imap4-store.c (connect_to_server_wrapper): + In the fallback cases, clear the exception first. + 2004-11-15 Jeffrey Stedfast * providers/imap/camel-imap-store.c (connect_to_server): Use diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c index 067221571a..eb66f48725 100644 --- a/camel/providers/imap/camel-imap-store.c +++ b/camel/providers/imap/camel-imap-store.c @@ -919,10 +919,13 @@ connect_to_server_wrapper (CamelService *service, CamelException *ex) if (ai == NULL) return FALSE; - if (!(ret = connect_to_server (service, ai, mode, ex)) && mode == MODE_SSL) + if (!(ret = connect_to_server (service, ai, mode, ex)) && mode == MODE_SSL) { + camel_exception_clear (ex); ret = connect_to_server (service, ai, MODE_TLS, ex); - else if (!ret && mode == MODE_TLS) + } else if (!ret && mode == MODE_TLS) { + camel_exception_clear (ex); ret = connect_to_server (service, ai, MODE_CLEAR, ex); + } camel_freeaddrinfo (ai); diff --git a/camel/providers/imap4/camel-imap4-store.c b/camel/providers/imap4/camel-imap4-store.c index 809be506a9..ec24c59235 100644 --- a/camel/providers/imap4/camel-imap4-store.c +++ b/camel/providers/imap4/camel-imap4-store.c @@ -319,8 +319,8 @@ connect_to_server_wrapper (CamelIMAP4Engine *engine, CamelException *ex) struct addrinfo *ai, hints; const char *ssl_mode; int mode, ret, i; - char *serv; const char *port; + char *serv; if ((ssl_mode = camel_url_get_param (service->url, "use_ssl"))) { for (i = 0; ssl_options[i].value; i++) @@ -352,10 +352,13 @@ connect_to_server_wrapper (CamelIMAP4Engine *engine, CamelException *ex) if (ai == NULL) return FALSE; - if (!(ret = connect_to_server (engine, ai, mode, ex)) && mode == MODE_SSL) + if (!(ret = connect_to_server (engine, ai, mode, ex)) && mode == MODE_SSL) { + camel_exception_clear (ex); ret = connect_to_server (engine, ai, MODE_TLS, ex); - else if (!ret && mode == MODE_TLS) + } else if (!ret && mode == MODE_TLS) { + camel_exception_clear (ex); ret = connect_to_server (engine, ai, MODE_CLEAR, ex); + } camel_freeaddrinfo (ai); diff --git a/camel/providers/pop3/camel-pop3-store.c b/camel/providers/pop3/camel-pop3-store.c index d25a533704..4e0a046f00 100644 --- a/camel/providers/pop3/camel-pop3-store.c +++ b/camel/providers/pop3/camel-pop3-store.c @@ -319,10 +319,13 @@ connect_to_server_wrapper (CamelService *service, CamelException *ex) if (ai == NULL) return FALSE; - if (!(ret = connect_to_server (service, ai, mode, ex)) && mode == MODE_SSL) + if (!(ret = connect_to_server (service, ai, mode, ex)) && mode == MODE_SSL) { + camel_exception_clear (ex); ret = connect_to_server (service, ai, MODE_TLS, ex); - else if (!ret && mode == MODE_TLS) + } else if (!ret && mode == MODE_TLS) { + camel_exception_clear (ex); ret = connect_to_server (service, ai, MODE_CLEAR, ex); + } camel_freeaddrinfo (ai); -- cgit