aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-03-15 08:51:09 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-03-15 08:51:09 +0800
commit343844c13863d00b3210d11956056af8b1d367ce (patch)
tree4dcc10acea574a0c04faade1ce13a8e33e150782 /camel
parent1e9f8b5d127babb1837cf9572ff784a6173be244 (diff)
downloadgsoc2013-evolution-343844c13863d00b3210d11956056af8b1d367ce.tar
gsoc2013-evolution-343844c13863d00b3210d11956056af8b1d367ce.tar.gz
gsoc2013-evolution-343844c13863d00b3210d11956056af8b1d367ce.tar.bz2
gsoc2013-evolution-343844c13863d00b3210d11956056af8b1d367ce.tar.lz
gsoc2013-evolution-343844c13863d00b3210d11956056af8b1d367ce.tar.xz
gsoc2013-evolution-343844c13863d00b3210d11956056af8b1d367ce.tar.zst
gsoc2013-evolution-343844c13863d00b3210d11956056af8b1d367ce.zip
Eek! So the service's URL isn't set until after this is initialized. This
2001-03-14 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store.c (camel_imap_store_init): Eek! So the service's URL isn't set until after this is initialized. This means we can't check for SSL here. (imap_connect): Set the SSL options here instead. svn path=/trunk/; revision=8715
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog7
-rw-r--r--camel/camel-tcp-stream-ssl.c2
-rw-r--r--camel/camel.c2
-rw-r--r--camel/providers/imap/camel-imap-store.c25
4 files changed, 21 insertions, 15 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 43c70baec2..54134464a0 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,12 @@
2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
+ * providers/imap/camel-imap-store.c (camel_imap_store_init): Eek!
+ So the service's URL isn't set until after this is
+ initialized. This means we can't check for SSL here.
+ (imap_connect): Set the SSL options here instead.
+
+2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
+
* camel-tcp-stream-ssl.c: Numerous fixes to get it to build
correctly with NSS enabled.
diff --git a/camel/camel-tcp-stream-ssl.c b/camel/camel-tcp-stream-ssl.c
index 42c50eccca..e34cef0202 100644
--- a/camel/camel-tcp-stream-ssl.c
+++ b/camel/camel-tcp-stream-ssl.c
@@ -182,7 +182,7 @@ static ssize_t
stream_write (CamelStream *stream, const char *buffer, size_t n)
{
CamelTcpStreamSSL *tcp_stream_ssl = CAMEL_TCP_STREAM_SSL (stream);
- ssize_t written;
+ ssize_t written = 0;
do {
written = PR_Write (tcp_stream_ssl->sockfd, buffer, n);
diff --git a/camel/camel.c b/camel/camel.c
index 4aa4512722..38ad4a9a09 100644
--- a/camel/camel.c
+++ b/camel/camel.c
@@ -54,7 +54,7 @@ camel_init (const char *certdb)
#ifdef HAVE_NSS
PR_Init (PR_SYSTEM_THREAD, PR_PRIORITY_NORMAL, 10);
- if (NSS_Init (certdb) == SECFailure) {
+ if (NSS_Init ("/home/fejj/.mozilla/default") == SECFailure) {
g_warning ("Failed to initialize NSS");
return -1;
}
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index db1c1f9c80..dd25bea6d9 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -144,17 +144,9 @@ 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;
+ remote_store->use_ssl = FALSE;
imap_store->dir_sep = '\0';
imap_store->current_folder = NULL;
@@ -401,12 +393,19 @@ imap_connect (CamelService *service, CamelException *ex)
{
CamelImapStore *store = CAMEL_IMAP_STORE (service);
CamelSession *session = camel_service_get_session (service);
+ CamelServiceAuthType *authtype = NULL;
char *result, *errbuf = NULL, *name;
- CamelImapResponse *response;
gboolean authenticated = FALSE;
+ CamelImapResponse *response;
int len, i, flags;
- CamelServiceAuthType *authtype = NULL;
-
+
+ if (!g_strcasecmp (service->url->protocol, "imaps")) {
+ CamelRemoteStore *rstore = CAMEL_REMOTE_STORE (service);
+
+ rstore->default_port = 993;
+ rstore->use_ssl = TRUE;
+ }
+
if (connect_to_server (service, ex) == 0)
return FALSE;