From f50ddd9de119590e93f2fe6939b0a364c357783d Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Wed, 28 Feb 2001 18:41:27 +0000 Subject: 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 --- camel/camel-remote-store.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'camel/camel-remote-store.c') 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; -- cgit v1.2.3