aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/imap
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-03-15 05:59:40 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-03-15 05:59:40 +0800
commit174adfa471581f0a322b4e381d9671b2b50ac9d4 (patch)
treed3cbf73426097bb481593a6b8c3b7e0c4b1e32b3 /camel/providers/imap
parent4391d0f3b1d03097f8e4fffd24857e54f8ea1eec (diff)
downloadgsoc2013-evolution-174adfa471581f0a322b4e381d9671b2b50ac9d4.tar
gsoc2013-evolution-174adfa471581f0a322b4e381d9671b2b50ac9d4.tar.gz
gsoc2013-evolution-174adfa471581f0a322b4e381d9671b2b50ac9d4.tar.bz2
gsoc2013-evolution-174adfa471581f0a322b4e381d9671b2b50ac9d4.tar.lz
gsoc2013-evolution-174adfa471581f0a322b4e381d9671b2b50ac9d4.tar.xz
gsoc2013-evolution-174adfa471581f0a322b4e381d9671b2b50ac9d4.tar.zst
gsoc2013-evolution-174adfa471581f0a322b4e381d9671b2b50ac9d4.zip
Numerous fixes to get it to build correctly with NSS enabled.
2001-03-14 Jeffrey Stedfast <fejj@ximian.com> * camel-tcp-stream-ssl.c: Numerous fixes to get it to build correctly with NSS enabled. * camel-remote-store.c (remote_connect): Pass in the session and expected host args, oops. * camel-provider.h (CAMEL_URL_ALLOW_SSL): Defined. * providers/imap/camel-imap-store.c (camel_imap_store_init): Check to see if we are supposed to use SSL and set the options accordingly. (imap_connect): Return FALSE here instead of NULL. * providers/imap/camel-imap-provider.c: Add CAMEL_URL_ALLOW_SSL. * providers/imap/libcamelimap.urls: Add "imaps" which is the protocol for Secure IMAP. svn path=/trunk/; revision=8711
Diffstat (limited to 'camel/providers/imap')
-rw-r--r--camel/providers/imap/camel-imap-provider.c3
-rw-r--r--camel/providers/imap/camel-imap-store.c17
-rw-r--r--camel/providers/imap/libcamelimap.urls1
3 files changed, 16 insertions, 5 deletions
diff --git a/camel/providers/imap/camel-imap-provider.c b/camel/providers/imap/camel-imap-provider.c
index 9b962df5f4..91f397277a 100644
--- a/camel/providers/imap/camel-imap-provider.c
+++ b/camel/providers/imap/camel-imap-provider.c
@@ -46,7 +46,8 @@ static CamelProvider imap_provider = {
CAMEL_PROVIDER_IS_STORAGE,
CAMEL_URL_NEED_USER | CAMEL_URL_NEED_HOST |
- CAMEL_URL_ALLOW_PATH | CAMEL_URL_ALLOW_AUTH,
+ CAMEL_URL_ALLOW_PATH | CAMEL_URL_ALLOW_AUTH |
+ CAMEL_URL_ALLOW_SSL,
{ 0, 0 },
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index c13a584a33..db1c1f9c80 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -144,9 +144,18 @@ camel_imap_store_init (gpointer object, gpointer klass)
CamelRemoteStore *remote_store = CAMEL_REMOTE_STORE (object);
CamelImapStore *imap_store = CAMEL_IMAP_STORE (object);
CamelStore *store = CAMEL_STORE (object);
+ CamelURL *url;
+
+ url = CAMEL_SERVICE (store)->url;
+
+ if (!g_strcasecmp (url->protocol, "imaps")) {
+ remote_store->default_port = 993;
+ remote_store->use_ssl = TRUE;
+ } else {
+ remote_store->default_port = 143;
+ remote_store->use_ssl = FALSE;
+ }
- remote_store->default_port = 143;
-
imap_store->dir_sep = '\0';
imap_store->current_folder = NULL;
@@ -155,7 +164,7 @@ camel_imap_store_init (gpointer object, gpointer klass)
imap_store->connected = FALSE;
imap_store->subscribed_folders = NULL;
- imap_store->priv = g_malloc0(sizeof(*imap_store->priv));
+ imap_store->priv = g_malloc0 (sizeof (*imap_store->priv));
#ifdef ENABLE_THREADS
imap_store->priv->command_lock = e_mutex_new(E_MUTEX_REC);
#endif
@@ -469,7 +478,7 @@ imap_connect (CamelService *service, CamelException *ex)
* a bad password. So reconnect here.
*/
if (!connect_to_server (service, ex))
- return NULL;
+ return FALSE;
}
if (authtype)
diff --git a/camel/providers/imap/libcamelimap.urls b/camel/providers/imap/libcamelimap.urls
index c301c0ffac..cf07f4426f 100644
--- a/camel/providers/imap/libcamelimap.urls
+++ b/camel/providers/imap/libcamelimap.urls
@@ -1 +1,2 @@
imap
+imaps