-2009-02-26 Milan Crha <mcrha@redhat.com>
+2009-03-07 Matthew Barnes <mbarnes@redhat.com>
- ** Fix for bug #573240
-
- * camel-imap-store.c: (camel_imap_store_readline):
- * camel-imap-command.c: (imap_command_start),
- (camel_imap_command_continuation), (imap_read_untagged):
- Do not disconnect on user canceled.
+ ** Revert changes for bug #534938 because it breaks message
+ loading in IMAP and can cause summary database corruption.
2009-02-12 Milan Crha <mcrha@redhat.com>
else
camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
g_strerror (errno));
-
- if (g_str_has_prefix (cmd, "LOGIN"))
- camel_service_disconnect (CAMEL_SERVICE (store), FALSE, NULL);
+
+ camel_service_disconnect (CAMEL_SERVICE (store), FALSE, NULL);
return FALSE;
}
if (camel_stream_write (store->ostream, cmd, cmdlen) == -1 ||
camel_stream_write (store->ostream, "\r\n", 2) == -1) {
- if (errno == EINTR) {
+ if (errno == EINTR)
camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL,
_("Operation cancelled"));
- } else {
+ else
camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
g_strerror (errno));
- camel_service_disconnect (CAMEL_SERVICE (store), FALSE, NULL);
- }
+ camel_service_disconnect (CAMEL_SERVICE (store), FALSE, NULL);
CAMEL_SERVICE_REC_UNLOCK (store, connect_lock);
return NULL;
}
do {
if ((n = camel_stream_read (store->istream, str->str + nread + 1, length - nread)) == -1) {
- if (errno == EINTR) {
+ if (errno == EINTR)
camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL,
_("Operation cancelled"));
- } else {
+ else
camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
g_strerror (errno));
- camel_service_disconnect (CAMEL_SERVICE (store), FALSE, NULL);
- }
-
+ camel_service_disconnect (CAMEL_SERVICE (store), FALSE, NULL);
g_string_free (str, TRUE);
goto lose;
}
}
if (nread <= 0) {
- if (errno == EINTR) {
+ if (errno == EINTR)
camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL, _("Operation cancelled"));
- } else {
+ else
camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
_("Server unexpectedly disconnected: %s"),
g_strerror (errno));
- camel_service_disconnect (CAMEL_SERVICE (store), FALSE, NULL);
- }
-
+ camel_service_disconnect (CAMEL_SERVICE (store), FALSE, NULL);
g_byte_array_free (ba, TRUE);
return -1;
}