aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camel/ChangeLog7
-rw-r--r--camel/camel-remote-store.c5
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;