aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-remote-store.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-03-01 02:41:27 +0800
committerDan Winship <danw@src.gnome.org>2001-03-01 02:41:27 +0800
commitf50ddd9de119590e93f2fe6939b0a364c357783d (patch)
tree40e9c8dc4f024ade230c08c9c6ea585e91bf7da3 /camel/camel-remote-store.c
parent4321d72d9ba3e58e4ab05a75dc4beeb16246a392 (diff)
downloadgsoc2013-evolution-f50ddd9de119590e93f2fe6939b0a364c357783d.tar
gsoc2013-evolution-f50ddd9de119590e93f2fe6939b0a364c357783d.tar.gz
gsoc2013-evolution-f50ddd9de119590e93f2fe6939b0a364c357783d.tar.bz2
gsoc2013-evolution-f50ddd9de119590e93f2fe6939b0a364c357783d.tar.lz
gsoc2013-evolution-f50ddd9de119590e93f2fe6939b0a364c357783d.tar.xz
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/camel-remote-store.c')
-rw-r--r--camel/camel-remote-store.c5
1 files changed, 5 insertions, 0 deletions
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;