diff options
author | Not Zed <NotZed@Ximian.com> | 2001-01-16 11:54:45 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2001-01-16 11:54:45 +0800 |
commit | e3a451cb33cad9dada930fd5111bcc6c341d5a2b (patch) | |
tree | 3bee6ca799aa5e36d8c6d1a0474ab7091e688a2e /camel/providers/imap/camel-imap-command.c | |
parent | e202430d41d6b793e94d7ac0d252de826e80991b (diff) | |
download | gsoc2013-evolution-e3a451cb33cad9dada930fd5111bcc6c341d5a2b.tar gsoc2013-evolution-e3a451cb33cad9dada930fd5111bcc6c341d5a2b.tar.gz gsoc2013-evolution-e3a451cb33cad9dada930fd5111bcc6c341d5a2b.tar.bz2 gsoc2013-evolution-e3a451cb33cad9dada930fd5111bcc6c341d5a2b.tar.lz gsoc2013-evolution-e3a451cb33cad9dada930fd5111bcc6c341d5a2b.tar.xz gsoc2013-evolution-e3a451cb33cad9dada930fd5111bcc6c341d5a2b.tar.zst gsoc2013-evolution-e3a451cb33cad9dada930fd5111bcc6c341d5a2b.zip |
Chganged len back to be unsigned. And do a simple range check on the
2001-01-16 Not Zed <NotZed@Ximian.com>
* camel-folder-summary.c (camel_folder_summary_decode_string):
Chganged len back to be unsigned. And do a simple range check on
the string value to try and detect corrupted summary files.
* providers/imap/camel-imap-command.c (imap_read_untagged): Handle
cancelled stream reads with an appropriate exception.
* providers/imap/camel-imap-private.h: Fix the include-once
macro. Doh, confliced with camel-private.h.
* providers/imap/camel-imap-store.c (imap_store_refresh_folders):
A copy of camel_remote_store_refresh_folders. We avoid locking
each folder when we call it though. This should be removed when i
can work out how to remove the folder lock from this function
easily.
* camel-stream-fs.c (stream_write): Fix n' argument of select.
(stream_read): Likewise.
* camel-remote-store.c (socket_connect): Bump the connect timeout
upto 4 minutes.
(socket_connect): Oops, fix the 'n' argument of select.
* camel-session.c (camel_cancel_cancel): If we are given no
cancellation node, then do it for all active ones.
svn path=/trunk/; revision=7526
Diffstat (limited to 'camel/providers/imap/camel-imap-command.c')
-rw-r--r-- | camel/providers/imap/camel-imap-command.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/camel/providers/imap/camel-imap-command.c b/camel/providers/imap/camel-imap-command.c index af61ed0981..db8cdd29dd 100644 --- a/camel/providers/imap/camel-imap-command.c +++ b/camel/providers/imap/camel-imap-command.c @@ -30,6 +30,7 @@ #include <stdarg.h> #include <stdio.h> #include <string.h> +#include <errno.h> #include "camel-imap-command.h" #include "camel-imap-utils.h" @@ -283,6 +284,14 @@ imap_read_untagged (CamelImapStore *store, char *line, CamelException *ex) str->str[0] = '\n'; nread = camel_stream_read (CAMEL_REMOTE_STORE (store)->istream, str->str + 1, length); + if (nread == -1) { + if (errno == EINTR) + camel_exception_set(ex, CAMEL_EXCEPTION_USER_CANCEL, _("Operation cancelled")); + else + camel_exception_set(ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE, strerror(errno)); + camel_service_disconnect (CAMEL_SERVICE (store), FALSE, NULL); + goto lose; + } if (nread < length) { camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE, _("Server response ended too soon.")); |