[evolution-data-server] Re-fetch capabilities after STARTTLS. There might be new auth methods available
- From: David Woodhouse <dwmw2 src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Re-fetch capabilities after STARTTLS. There might be new auth methods available
- Date: Thu, 24 Jun 2010 13:00:26 +0000 (UTC)
commit 2c9e14be88463cb00819393f17573dd4aed0e56c
Author: David Woodhouse <David Woodhouse intel com>
Date: Thu Jun 17 14:58:41 2010 +0100
Re-fetch capabilities after STARTTLS. There might be new auth methods available
camel/providers/imapx/camel-imapx-server.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index 6389d41..d227eb2 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -2420,6 +2420,16 @@ imapx_connect_to_server (CamelIMAPXServer *is, CamelException *ex)
camel_imapx_command_free(ic);
goto exit;
}
+
+ /* See if we got new capabilities in the STARTTLS response */
+ imapx_free_capability(is->cinfo);
+ is->cinfo = NULL;
+ if (ic->status->condition == IMAPX_CAPABILITY) {
+ is->cinfo = ic->status->u.cinfo;
+ ic->status->u.cinfo = NULL;
+ c(printf("got capability flags %08x\n", is->cinfo->capa));
+ }
+
camel_imapx_command_free(ic);
if (camel_tcp_stream_ssl_enable_ssl (CAMEL_TCP_STREAM_SSL (tcp_stream)) == -1) {
@@ -2428,6 +2438,16 @@ imapx_connect_to_server (CamelIMAPXServer *is, CamelException *ex)
is->url->host, _("SSL negotiations failed"));
goto exit;
}
+ /* Get new capabilities if they weren't already given */
+ if (!is->cinfo) {
+ ic = camel_imapx_command_new("CAPABILITY", NULL, "CAPABILITY");
+ imapx_command_run (is, ic);
+ camel_exception_xfer (ex, ic->ex);
+ camel_imapx_command_free(ic);
+
+ if (camel_exception_is_set (ex))
+ goto exit;
+ }
}
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]