aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog9
-rw-r--r--camel/providers/imap4/camel-imap4-store.c13
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