[evolution-patches] 22496, imap alerts




? camel/c.diff
? camel/tests/folder/test10
? camel/tests/folder/test11
? camel/tests/message/test4
? camel/tests/mime-filter/test-tohtml
? camel/tests/misc/test2
? camel/tests/misc/url-scan
Index: camel/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/camel/Attic/ChangeLog,v
retrieving revision 1.2251.2.35
diff -u -p -r1.2251.2.35 ChangeLog
--- camel/ChangeLog	24 Jan 2005 08:31:57 -0000	1.2251.2.35
+++ camel/ChangeLog	28 Jan 2005 04:11:10 -0000
@@ -1,3 +1,11 @@
+2005-01-28  Not Zed  <NotZed Ximian com>
+
+	** See bug #22496.
+
+	* providers/imap/camel-imap-command.c
+	(camel_imap_command_response): check for no and bad [alert] as
+	well as ok [alert].
+
 2005-01-17  Not Zed  <NotZed Ximian com>
 
 	* tests/lib/folders.c (test_folder_basic): dont enforce local
Index: camel/providers/imap/camel-imap-command.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/providers/imap/Attic/camel-imap-command.c,v
retrieving revision 1.60.26.4
diff -u -p -r1.60.26.4 camel-imap-command.c
--- camel/providers/imap/camel-imap-command.c	21 Jan 2005 04:43:57 -0000	1.60.26.4
+++ camel/providers/imap/camel-imap-command.c	28 Jan 2005 04:11:11 -0000
@@ -313,10 +313,13 @@ camel_imap_command_response (CamelImapSt
 		respbuf = imap_read_untagged (store, respbuf, ex);
 		if (!respbuf)
 			type = CAMEL_IMAP_RESPONSE_ERROR;
-		else if (!strncasecmp (respbuf, "* OK [ALERT]", 12)) {
+		else if (!g_ascii_strncasecmp (respbuf, "* OK [ALERT]", 12)
+			 || !g_ascii_strncasecmp (respbuf, "* NO [ALERT]", 12)
+			 || !g_ascii_strncasecmp (respbuf, "* BAD [ALERT]", 13)) {
 			char *msg;
 
 			/* for imap ALERT codes, account user host */
+			/* we might get a ']' from a BAD response since we +12, but who cares? */
 			msg = g_strdup_printf(_("Alert from IMAP server %s %s:\n%s"),
 					      ((CamelService *)store)->url->user, ((CamelService *)store)->url->host, respbuf+12);
 			camel_session_alert_user(((CamelService *)store)->session, CAMEL_SESSION_ALERT_WARNING, msg, FALSE);


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