evolution-data-server r8888 - branches/gnome-2-22/camel/providers/imap



Author: abharath
Date: Mon Jun  2 04:08:02 2008
New Revision: 8888
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=8888&view=rev

Log:
Committing on behalf of  Milan Crha  <mcrha redhat com>

2008-05-30  Milan Crha  <mcrha redhat com>

        ** Fix for bug #374616

         * camel-imap-command.c: (camel_imap_command_response):
         Show server's error message on "BYE" if available.


Modified:
   branches/gnome-2-22/camel/providers/imap/ChangeLog
   branches/gnome-2-22/camel/providers/imap/camel-imap-command.c

Modified: branches/gnome-2-22/camel/providers/imap/camel-imap-command.c
==============================================================================
--- branches/gnome-2-22/camel/providers/imap/camel-imap-command.c	(original)
+++ branches/gnome-2-22/camel/providers/imap/camel-imap-command.c	Mon Jun  2 04:08:02 2008
@@ -305,11 +305,19 @@
 	switch (*respbuf) {
 	case '*':
 		if (!g_ascii_strncasecmp (respbuf, "* BYE", 5)) {
+			const char *err = NULL;
+
+			if (respbuf [5] && g_ascii_strncasecmp (respbuf + 6, "[ALERT] ", 8) == 0)
+				err = respbuf + 14;
+
+			if (!err || !*err)
+				err = g_strerror (104);
+
 			/* Connection was lost, no more data to fetch */
 			camel_service_disconnect (CAMEL_SERVICE (store), FALSE, NULL);
 			camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
 					      _("Server unexpectedly disconnected: %s"),
-					      _("Unknown error")); /* g_strerror (104));  FIXME after 1.0 is released */
+					      err);
 			store->connected = FALSE;
 			g_free (respbuf);
 			respbuf = NULL;



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