From cb92bb76a6b0b8001393600fc4dbfe65b807e624 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Mon, 21 May 2001 22:53:15 +0000 Subject: Store the CamelFolderInfo tree that was returned from 2001-05-21 Jeffrey Stedfast * providers/imap/camel-imap-store.c (get_folder_info_online): Store the CamelFolderInfo tree that was returned from camel_folder_info_build() in a new variable, 'tree', rather than 'fi' since we later use 'fi' when syncing folders. Not only does this fix a memory leak, but it also fixes the bug where the user would only see the last folder in the folder list and/or it's subfolders. svn path=/trunk/; revision=9911 --- camel/ChangeLog | 12 +++++++++++- camel/camel-tcp-stream-openssl.c | 2 ++ camel/providers/imap/camel-imap-store.c | 8 ++++---- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/camel/ChangeLog b/camel/ChangeLog index 461ad7ef3f..28e511d4b7 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,13 @@ +2001-05-21 Jeffrey Stedfast + + * providers/imap/camel-imap-store.c (get_folder_info_online): + Store the CamelFolderInfo tree that was returned from + camel_folder_info_build() in a new variable, 'tree', rather than + 'fi' since we later use 'fi' when syncing folders. Not only does + this fix a memory leak, but it also fixes the bug where the user + would only see the last folder in the folder list and/or it's + subfolders. + 2001-05-16 Jeffrey Stedfast * camel-session.c (camel_session_forget_password): The service can @@ -29,7 +39,7 @@ variables so we don't link in tons of extra cruft that we don't need. - * tests/smime/pkcs7.c: Added t the test suite - tests the S/MIME + * tests/smime/pkcs7.c: Added to the test suite - tests the S/MIME pkcs7 functions. 2001-05-14 Jeffrey Stedfast diff --git a/camel/camel-tcp-stream-openssl.c b/camel/camel-tcp-stream-openssl.c index 0312e65b44..214269a433 100644 --- a/camel/camel-tcp-stream-openssl.c +++ b/camel/camel-tcp-stream-openssl.c @@ -445,6 +445,8 @@ open_ssl_connection (CamelService *service, int sockfd) /* SSLv23_client_method will negotiate with SSL v2, v3, or TLS v1 */ ssl_ctx = SSL_CTX_new (SSLv23_client_method ()); + g_return_val_if_fail (ssl_ctx != NULL, NULL); + SSL_CTX_set_verify (ssl_ctx, SSL_VERIFY_PEER, &ssl_verify); ssl = SSL_new (ssl_ctx); SSL_set_fd (ssl, sockfd); diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c index bcdfc9f935..5138cda658 100644 --- a/camel/providers/imap/camel-imap-store.c +++ b/camel/providers/imap/camel-imap-store.c @@ -1053,7 +1053,7 @@ get_folder_info_online (CamelStore *store, const char *top, GPtrArray *folders; const char *name; char *pattern, *status, *p; - CamelFolderInfo *fi; + CamelFolderInfo *fi, *tree; int i; if (!camel_remote_store_connected (CAMEL_REMOTE_STORE (store), ex)) @@ -1133,10 +1133,10 @@ get_folder_info_online (CamelStore *store, const char *top, } /* Assemble. */ - fi = camel_folder_info_build (folders, name, imap_store->dir_sep, TRUE); + tree = camel_folder_info_build (folders, name, imap_store->dir_sep, TRUE); if (flags & CAMEL_STORE_FOLDER_INFO_FAST) { g_ptr_array_free (folders, TRUE); - return fi; + return tree; } /* Get unread counts. Sync flag changes to the server first so @@ -1185,7 +1185,7 @@ get_folder_info_online (CamelStore *store, const char *top, } g_ptr_array_free (folders, TRUE); - return fi; + return tree; } static gboolean -- cgit v1.2.3