evolution-data-server/evolution-data-server-2.25.92-unbreak-imap.patch

76 lines
3.0 KiB
Diff

diff -up evolution-data-server-2.25.92/camel/providers/imap/camel-imap-command.c.unbreak-imap evolution-data-server-2.25.92/camel/providers/imap/camel-imap-command.c
--- evolution-data-server-2.25.92/camel/providers/imap/camel-imap-command.c.unbreak-imap 2009-02-26 12:18:38.000000000 -0500
+++ evolution-data-server-2.25.92/camel/providers/imap/camel-imap-command.c 2009-03-07 14:15:05.000000000 -0500
@@ -232,9 +232,8 @@ imap_command_start (CamelImapStore *stor
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;
}
@@ -276,14 +275,13 @@ camel_imap_command_continuation (CamelIm
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;
}
@@ -491,15 +489,13 @@ imap_read_untagged (CamelImapStore *stor
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;
}
diff -up evolution-data-server-2.25.92/camel/providers/imap/camel-imap-store.c.unbreak-imap evolution-data-server-2.25.92/camel/providers/imap/camel-imap-store.c
--- evolution-data-server-2.25.92/camel/providers/imap/camel-imap-store.c.unbreak-imap 2009-02-26 12:18:38.000000000 -0500
+++ evolution-data-server-2.25.92/camel/providers/imap/camel-imap-store.c 2009-03-07 14:15:05.000000000 -0500
@@ -3033,16 +3033,14 @@ camel_imap_store_readline (CamelImapStor
}
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;
}