aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camel/ChangeLog6
-rw-r--r--camel/providers/imap/camel-imap-command.c10
2 files changed, 16 insertions, 0 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index e06a8eea94..c52f197070 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,9 @@
+2002-09-18 Not Zed <NotZed@Ximian.com>
+
+ * providers/imap/camel-imap-command.c
+ (camel_imap_command_response): If we get an ALERT, pass it to the
+ user. An rfc2060 MUST, and bug #22496.
+
2002-09-17 Jeffrey Stedfast <fejj@ximian.com>
* providers/imap/camel-imap-folder.c (parse_fetch_response):
diff --git a/camel/providers/imap/camel-imap-command.c b/camel/providers/imap/camel-imap-command.c
index e3581c80af..f12a4a55fb 100644
--- a/camel/providers/imap/camel-imap-command.c
+++ b/camel/providers/imap/camel-imap-command.c
@@ -42,6 +42,7 @@
#include <camel/camel-exception.h>
#include <camel/camel-private.h>
#include <camel/camel-utf8.h>
+#include <camel/camel-session.h>
#define d(x) x
@@ -318,6 +319,15 @@ camel_imap_command_response (CamelImapStore *store, char **response,
respbuf = imap_read_untagged (store, respbuf, ex);
if (!respbuf)
type = CAMEL_IMAP_RESPONSE_ERROR;
+ else if (!g_strncasecmp(respbuf, "* OK [ALERT]", 12)) {
+ char *msg;
+
+ /* for imap ALERT codes, account user@host */
+ 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);
+ g_free(msg);
+ }
break;
case '+':