diff options
author | Jeffrey Stedfast <fejj@novell.com> | 2004-11-03 02:31:52 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-11-03 02:31:52 +0800 |
commit | 95044986dd8fa3f96b4302323b5d22577bb84472 (patch) | |
tree | 6352777a8365f35de9f1bbe202450a8ce92ceb2e /camel | |
parent | cc2952f2e52a668c6588ac770a9c9926531ee6dd (diff) | |
download | gsoc2013-evolution-95044986dd8fa3f96b4302323b5d22577bb84472.tar gsoc2013-evolution-95044986dd8fa3f96b4302323b5d22577bb84472.tar.gz gsoc2013-evolution-95044986dd8fa3f96b4302323b5d22577bb84472.tar.bz2 gsoc2013-evolution-95044986dd8fa3f96b4302323b5d22577bb84472.tar.lz gsoc2013-evolution-95044986dd8fa3f96b4302323b5d22577bb84472.tar.xz gsoc2013-evolution-95044986dd8fa3f96b4302323b5d22577bb84472.tar.zst gsoc2013-evolution-95044986dd8fa3f96b4302323b5d22577bb84472.zip |
Removed camel_service_connect() call which is no longer needed.
2004-11-02 Jeffrey Stedfast <fejj@novell.com>
* providers/imap4/camel-imap4-store.c (imap4_get_folder_info):
Removed camel_service_connect() call which is no longer needed.
(imap4_connect): If engine is already connected, shortcut to
simply returning success.
(imap4_disconnect): Check engine state rather than poking at
stream state.
svn path=/trunk/; revision=27797
Diffstat (limited to 'camel')
-rw-r--r-- | camel/ChangeLog | 9 | ||||
-rw-r--r-- | camel/providers/imap4/camel-imap4-store.c | 13 |
2 files changed, 15 insertions, 7 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 80ca2c8a69..e0ce439045 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,12 @@ +2004-11-02 Jeffrey Stedfast <fejj@novell.com> + + * providers/imap4/camel-imap4-store.c (imap4_get_folder_info): + Removed camel_service_connect() call which is no longer needed. + (imap4_connect): If engine is already connected, shortcut to + simply returning success. + (imap4_disconnect): Check engine state rather than poking at + stream state. + 2004-11-01 Jeffrey Stedfast <fejj@novell.com> * providers/smtp/camel-smtp-transport.c diff --git a/camel/providers/imap4/camel-imap4-store.c b/camel/providers/imap4/camel-imap4-store.c index e5dab71f68..37c203479e 100644 --- a/camel/providers/imap4/camel-imap4-store.c +++ b/camel/providers/imap4/camel-imap4-store.c @@ -516,13 +516,17 @@ imap4_reconnect (CamelIMAP4Engine *engine, CamelException *ex) static gboolean imap4_connect (CamelService *service, CamelException *ex) { + CamelIMAP4Store *store = (CamelIMAP4Store *) service; gboolean retval; if (!camel_session_is_online (service->session)) return TRUE; CAMEL_SERVICE_LOCK (service, connect_lock); - retval = imap4_reconnect (((CamelIMAP4Store *) service)->engine, ex); + if (store->engine->state == CAMEL_IMAP4_ENGINE_DISCONNECTED) + retval = imap4_reconnect (store->engine, ex); + else + retval = TRUE; CAMEL_SERVICE_UNLOCK (service, connect_lock); return retval; @@ -539,7 +543,7 @@ imap4_disconnect (CamelService *service, gboolean clean, CamelException *ex) return TRUE; CAMEL_SERVICE_LOCK (store, connect_lock); - if (clean && !store->engine->istream->disconnected) { + if (clean && store->engine->state != CAMEL_IMAP4_ENGINE_DISCONNECTED) { ic = camel_imap4_engine_queue (store->engine, NULL, "LOGOUT\r\n"); while ((id = camel_imap4_engine_iterate (store->engine)) < ic->id && id != -1) ; @@ -1181,11 +1185,6 @@ imap4_get_folder_info (CamelStore *store, const char *top, guint32 flags, CamelE check_online: - if (engine->state == CAMEL_IMAP4_ENGINE_DISCONNECTED) { - if (!camel_service_connect ((CamelService *) store, ex)) - return NULL; - } - if (flags & CAMEL_STORE_FOLDER_INFO_SUBSCRIBED) cmd = "LSUB"; else |