[evolution-patches] fix for "Error: Success" with imap



Seems the problem happens when we get a 0-byte read from the socket.

the attached patch fixes the error (or, at least, one of the places
where error:success can happen)

Jeff

-- 
Jeffrey Stedfast
Evolution Hacker - Novell, Inc.
fejj ximian com  - www.novell.com
? ECONNRESET.patch
? camel-tls.patch
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/camel/ChangeLog,v
retrieving revision 1.2251.2.18
diff -u -r1.2251.2.18 ChangeLog
--- ChangeLog	13 Oct 2004 01:28:03 -0000	1.2251.2.18
+++ ChangeLog	14 Oct 2004 17:28:00 -0000
@@ -1,3 +1,10 @@
+2004-10-14  Jeffrey Stedfast  <fejj novell com>
+
+	* providers/imap/camel-imap-store.c (camel_imap_store_readline):
+	if nread is 0, then the other end closed the socket and so set
+	errno to ECONNRESET and use that rather than giving a "Success"
+	error.
+
 2004-10-12  Not Zed  <NotZed Ximian com>
 
 	** See bug ???
Index: providers/imap/camel-imap-store.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/providers/imap/camel-imap-store.c,v
retrieving revision 1.300.2.4
diff -u -r1.300.2.4 camel-imap-store.c
--- providers/imap/camel-imap-store.c	13 Oct 2004 01:28:03 -0000	1.300.2.4
+++ providers/imap/camel-imap-store.c	14 Oct 2004 17:28:01 -0000
@@ -3236,6 +3236,9 @@
 	}
 	
 	if (nread <= 0) {
+		if (nread == 0)
+			errno = ECONNRESET;
+		
 		if (errno == EINTR)
 			camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL, _("Operation cancelled"));
 		else

Attachment: smime.p7s
Description: S/MIME cryptographic signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]