From 42a713a3409dcdb73de2d5b19ddb493906a275f3 Mon Sep 17 00:00:00 2001 From: Colin Leroy Date: Wed, 31 May 2006 16:43:20 +0000 Subject: [PATCH] 2006-05-31 [colin] 2.2.0cvs68 * src/filtering.c Use g_slist_prepend * src/imap.c Don't remove caches when destroying folder, it could (should) be done at exit * src/inc.c free processing cache after incorporation * src/etpan/imap-thread.c Maybe fix bug #959 (Crash on moving to emails to a imap account per ssl with a expired certificate.) --- ChangeLog | 14 ++++++++++++++ PATCHSETS | 1 + configure.ac | 2 +- src/etpan/imap-thread.c | 4 ++-- src/filtering.c | 8 +++----- src/imap.c | 5 ----- src/inc.c | 1 + 7 files changed, 22 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 27971b97a..12d0bcd3d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2006-05-31 [colin] 2.2.0cvs68 + + * src/filtering.c + Use g_slist_prepend + * src/imap.c + Don't remove caches when destroying folder, it + could (should) be done at exit + * src/inc.c + free processing cache after incorporation + * src/etpan/imap-thread.c + Maybe fix bug #959 (Crash on moving to emails + to a imap account per ssl with a expired + certificate.) + 2006-05-30 [colin] 2.2.0cvs67 * src/summaryview.c diff --git a/PATCHSETS b/PATCHSETS index 29fcf674c..91fe210c4 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -1537,3 +1537,4 @@ ( cvs diff -u -r 1.179.2.117 -r 1.179.2.118 src/imap.c; ) > 2.2.0cvs65.patchset ( cvs diff -u -r 1.395.2.212 -r 1.395.2.213 src/summaryview.c; ) > 2.2.0cvs66.patchset ( cvs diff -u -r 1.395.2.213 -r 1.395.2.214 src/summaryview.c; ) > 2.2.0cvs67.patchset +( cvs diff -u -r 1.60.2.17 -r 1.60.2.18 src/filtering.c; cvs diff -u -r 1.179.2.118 -r 1.179.2.119 src/imap.c; cvs diff -u -r 1.149.2.49 -r 1.149.2.50 src/inc.c; cvs diff -u -r 1.1.4.37 -r 1.1.4.38 src/etpan/imap-thread.c; ) > 2.2.0cvs68.patchset diff --git a/configure.ac b/configure.ac index 9fe1a0308..cac5a7028 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=2 MICRO_VERSION=0 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=67 +EXTRA_VERSION=68 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/etpan/imap-thread.c b/src/etpan/imap-thread.c index 3912d5f8e..c12ea907c 100644 --- a/src/etpan/imap-thread.c +++ b/src/etpan/imap-thread.c @@ -338,12 +338,12 @@ static int etpan_certificate_check(const unsigned char *certificate, int len, vo g_warning("no cert presented.\n"); return 0; } - cert = d2i_X509(NULL, (unsigned char **) &certificate, len); + cert = d2i_X509(NULL, &certificate, len); if (cert == NULL) { g_warning("can't get cert\n"); return 0; } else if (ssl_certificate_check(cert, - (gchar *)param->server, param->port) == TRUE) { + (gchar *)param->server, (gushort)param->port) == TRUE) { return 0; } else { return -1; diff --git a/src/filtering.c b/src/filtering.c index c886d9afe..d91dd9b63 100644 --- a/src/filtering.c +++ b/src/filtering.c @@ -182,7 +182,6 @@ void filtering_move_and_copy_msgs(GSList *msgs) while (messages) { GSList *batch = NULL, *cur; gint found = 0; - debug_print("%d messages to filter\n", g_slist_length(messages)); for (cur = messages; cur; cur = cur->next) { MsgInfo *info = (MsgInfo *)cur->data; if (last_item == NULL) { @@ -201,7 +200,7 @@ void filtering_move_and_copy_msgs(GSList *msgs) if (info->to_filter_folder == last_item && info->is_copy == is_copy && info->is_move == is_move) { - batch = g_slist_append(batch, info); + batch = g_slist_prepend(batch, info); } } if (found == 0) { @@ -212,11 +211,11 @@ void filtering_move_and_copy_msgs(GSList *msgs) MsgInfo *info = (MsgInfo *)cur->data; messages = g_slist_remove(messages, info); } + batch = g_slist_reverse(batch); if (g_slist_length(batch)) { MsgInfo *info = (MsgInfo *)batch->data; - debug_print("%s %d messages to %s\n", + debug_print("%s messages to %s\n", is_copy?"copying":"moving", - g_slist_length(batch), folder_item_get_path(last_item)); if (is_copy && last_item != info->folder) { folder_item_copy_msgs(last_item, batch); @@ -233,7 +232,6 @@ void filtering_move_and_copy_msgs(GSList *msgs) last_item = NULL; is_copy = FALSE; is_move = FALSE; - debug_print("%d messages remaining\n", g_slist_length(messages)); } /* we don't reference the msginfos, because caller will do */ g_slist_free(messages); diff --git a/src/imap.c b/src/imap.c index 3dc14302a..b372b70dc 100644 --- a/src/imap.c +++ b/src/imap.c @@ -488,11 +488,6 @@ static void imap_folder_destroy(Folder *folder) while (imap_folder_get_refcnt(folder) > 0) gtk_main_iteration(); - dir = imap_folder_get_path(folder); - if (is_dir_exist(dir)) - remove_dir_recursive(dir); - g_free(dir); - folder_remote_folder_destroy(REMOTE_FOLDER(folder)); imap_done(folder); } diff --git a/src/inc.c b/src/inc.c index 428156251..d7a4e51bb 100644 --- a/src/inc.c +++ b/src/inc.c @@ -687,6 +687,7 @@ static gint inc_start(IncProgressDialog *inc_dialog) inc_state == INC_IO_ERROR) break; } + folder_item_free_cache(processing); inc_session_destroy(session); inc_dialog->queue_list =