aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2002-09-19 09:41:38 +0800
committerMichael Zucci <zucchi@src.gnome.org>2002-09-19 09:41:38 +0800
commit59fe32189b18f9797347c5be2de77c03fa4a11d0 (patch)
tree8cfdc49eafa16951a73560057ac5f03c4cc7c8ab /camel
parent8b0060a21590c79923a69426da6dcbbb8a18da74 (diff)
downloadgsoc2013-evolution-59fe32189b18f9797347c5be2de77c03fa4a11d0.tar.gz
gsoc2013-evolution-59fe32189b18f9797347c5be2de77c03fa4a11d0.tar.zst
gsoc2013-evolution-59fe32189b18f9797347c5be2de77c03fa4a11d0.zip
If we get an ALERT, pass it to the user. An rfc2060 MUST, and bug #22496.
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. svn path=/trunk/; revision=18107
Diffstat (limited to 'camel')
-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 '+':