diff options
author | Milan Crha <mcrha@redhat.com> | 2008-06-02 04:10:08 +0000 |
---|---|---|
committer | Bharath Acharya <abharath@src.gnome.org> | 2008-06-02 04:10:08 +0000 |
commit | d6676f17512779d0edab1d2ed0b193bf44a21572 (patch) | |
tree | e28a6fdd4fd98d84d842864a6c0f9205aceeeead | |
parent | 38bebba9fbba3f3fea87258931b2f269b912b082 (diff) | |
download | evolution-data-server-d6676f17512779d0edab1d2ed0b193bf44a21572.tar.gz |
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.
svn path=/trunk/; revision=8889
-rw-r--r-- | camel/providers/imap/ChangeLog | 7 | ||||
-rw-r--r-- | camel/providers/imap/camel-imap-command.c | 10 |
2 files changed, 16 insertions, 1 deletions
diff --git a/camel/providers/imap/ChangeLog b/camel/providers/imap/ChangeLog index 6f5a49543..d5ceffc81 100644 --- a/camel/providers/imap/ChangeLog +++ b/camel/providers/imap/ChangeLog @@ -1,3 +1,10 @@ +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. + 2008-05-29 Milan Crha <mcrha@redhat.com> ** Fix for bug #326149 diff --git a/camel/providers/imap/camel-imap-command.c b/camel/providers/imap/camel-imap-command.c index 0af848b94..b98015bbb 100644 --- a/camel/providers/imap/camel-imap-command.c +++ b/camel/providers/imap/camel-imap-command.c @@ -305,11 +305,19 @@ camel_imap_command_response (CamelImapStore *store, char **response, 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; |