diff options
author | Dan Winship <danw@src.gnome.org> | 2001-03-01 02:41:27 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2001-03-01 02:41:27 +0800 |
commit | f50ddd9de119590e93f2fe6939b0a364c357783d (patch) | |
tree | 40e9c8dc4f024ade230c08c9c6ea585e91bf7da3 /camel | |
parent | 4321d72d9ba3e58e4ab05a75dc4beeb16246a392 (diff) | |
download | gsoc2013-evolution-f50ddd9de119590e93f2fe6939b0a364c357783d.tar.gz gsoc2013-evolution-f50ddd9de119590e93f2fe6939b0a364c357783d.tar.zst gsoc2013-evolution-f50ddd9de119590e93f2fe6939b0a364c357783d.zip |
If we get back 0 bytes from camel_stream_buffer_gets, that means the
* camel-remote-store.c (remote_recv_line): If we get back 0 bytes
from camel_stream_buffer_gets, that means the socket got
disconnected, so set an exception. (Noticed because of a message
that crashes our IMAP server when you try to look at it. :)
svn path=/trunk/; revision=8429
Diffstat (limited to 'camel')
-rw-r--r-- | camel/ChangeLog | 7 | ||||
-rw-r--r-- | camel/camel-remote-store.c | 5 |
2 files changed, 12 insertions, 0 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index e370e7bbc3..444d3b8ea3 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,10 @@ +2001-02-28 Dan Winship <danw@ximian.com> + + * camel-remote-store.c (remote_recv_line): If we get back 0 bytes + from camel_stream_buffer_gets, that means the socket got + disconnected, so set an exception. (Noticed because of a message + that crashes our IMAP server when you try to look at it. :) + 2001-02-28 Jeffrey Stedfast <fejj@ximian.com> * Makefile.am: Added camel-sasl*.[c,h] to the build. diff --git a/camel/camel-remote-store.c b/camel/camel-remote-store.c index 52f1908f05..41e16a27fc 100644 --- a/camel/camel-remote-store.c +++ b/camel/camel-remote-store.c @@ -538,6 +538,11 @@ remote_recv_line (CamelRemoteStore *store, char **dest, CamelException *ex) camel_exception_set(ex, CAMEL_EXCEPTION_USER_CANCEL, _("Operation cancelled")); else camel_exception_set(ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE, strerror(errno)); + } else if (bytes->len == 0) { + camel_exception_set(ex, CAMEL_EXCEPTION_SERVICE_NOT_CONNECTED, + _("Server unexpectedly disconnected")); + } + if (camel_exception_is_set (ex)) { g_byte_array_free(bytes, TRUE); camel_service_disconnect (CAMEL_SERVICE (store), FALSE, NULL); return -1; |