diff options
author | Not Zed <NotZed@Ximian.com> | 2002-06-03 22:04:48 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2002-06-03 22:04:48 +0800 |
commit | d0330caab5267f7401e89e07479fda4657793a65 (patch) | |
tree | 518787ba107cf4ba6aaaf51cecb814384bbbf5d6 /camel | |
parent | 839b4be584653e671905a8fa772294cca01e44f7 (diff) | |
download | gsoc2013-evolution-d0330caab5267f7401e89e07479fda4657793a65.tar gsoc2013-evolution-d0330caab5267f7401e89e07479fda4657793a65.tar.gz gsoc2013-evolution-d0330caab5267f7401e89e07479fda4657793a65.tar.bz2 gsoc2013-evolution-d0330caab5267f7401e89e07479fda4657793a65.tar.lz gsoc2013-evolution-d0330caab5267f7401e89e07479fda4657793a65.tar.xz gsoc2013-evolution-d0330caab5267f7401e89e07479fda4657793a65.tar.zst gsoc2013-evolution-d0330caab5267f7401e89e07479fda4657793a65.zip |
Check that any unmatched operation is not concerning any vfolder. Other
2002-06-03 Not Zed <NotZed@Ximian.com>
* camel-vee-folder.c (camel_vee_folder_add_folder):
(folder_changed_change):
(folder_changed_remove_uid):
(folder_changed_add_uid):
(vee_folder_build_folder): Check that any unmatched operation is
not concerning any vfolder. Other vfolders should never be part of any
unmatched handling. For #24615, and others probably.
svn path=/trunk/; revision=17075
Diffstat (limited to 'camel')
-rw-r--r-- | camel/ChangeLog | 10 | ||||
-rw-r--r-- | camel/camel-vee-folder.c | 24 |
2 files changed, 24 insertions, 10 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 6961bdd7fe..dded90b650 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,13 @@ +2002-06-03 Not Zed <NotZed@Ximian.com> + + * camel-vee-folder.c (camel_vee_folder_add_folder): + (folder_changed_change): + (folder_changed_remove_uid): + (folder_changed_add_uid): + (vee_folder_build_folder): Check that any unmatched operation is + not concerning any vfolder. Other vfolders should never be part of any + unmatched handling. For #24615, and others probably. + 2002-06-02 Not Zed <NotZed@Ximian.com> * camel-sasl.c (camel_sasl_new): diff --git a/camel/camel-vee-folder.c b/camel/camel-vee-folder.c index 2ef25935b8..7904ab5f12 100644 --- a/camel/camel-vee-folder.c +++ b/camel/camel-vee-folder.c @@ -348,7 +348,7 @@ camel_vee_folder_add_folder(CamelVeeFolder *vf, CamelFolder *sub) camel_object_ref((CamelObject *)sub); p->folders = g_list_append(p->folders, sub); } - if ((vf->flags & CAMEL_STORE_FOLDER_PRIVATE) == 0) { + if ((vf->flags & CAMEL_STORE_FOLDER_PRIVATE) == 0 && !CAMEL_IS_VEE_FOLDER(sub)) { camel_object_ref((CamelObject *)sub); up->folders = g_list_append(up->folders, sub); } @@ -983,10 +983,12 @@ folder_added_uid(char *uidin, void *value, struct _update_data *u) if ( (mi = vee_folder_add_uid(u->vf, u->source, uidin, u->hash)) ) { camel_folder_change_info_add_uid(u->vf->changes, camel_message_info_uid(mi)); - if (g_hash_table_lookup_extended(unmatched_uids, camel_message_info_uid(mi), (void **)&oldkey, (void **)&n)) { - g_hash_table_insert(unmatched_uids, oldkey, (void *)(n+1)); - } else { - g_hash_table_insert(unmatched_uids, g_strdup(camel_message_info_uid(mi)), (void *)1); + if (!CAMEL_IS_VEE_FOLDER(u->source)) { + if (g_hash_table_lookup_extended(unmatched_uids, camel_message_info_uid(mi), (void **)&oldkey, (void **)&n)) { + g_hash_table_insert(unmatched_uids, oldkey, (void *)(n+1)); + } else { + g_hash_table_insert(unmatched_uids, g_strdup(camel_message_info_uid(mi)), (void *)1); + } } } } @@ -1048,7 +1050,8 @@ vee_folder_build_folder(CamelVeeFolder *vf, CamelFolder *source, CamelException camel_folder_summary_remove_index(folder->summary, i); camel_folder_change_info_remove_uid(vf->changes, camel_message_info_uid(mi)); i--; - if (g_hash_table_lookup_extended(unmatched_uids, uid, (void **)&oldkey, (void **)&n)) { + if (!CAMEL_IS_VEE_FOLDER(source) + && g_hash_table_lookup_extended(unmatched_uids, uid, (void **)&oldkey, (void **)&n)) { if (n == 1) { g_hash_table_remove(unmatched_uids, oldkey); g_free(oldkey); @@ -1090,7 +1093,8 @@ vee_folder_build_folder(CamelVeeFolder *vf, CamelFolder *source, CamelException } /* now allhash contains all potentially new uid's for the unmatched folder, process */ - g_hash_table_foreach(allhash, (GHFunc)unmatched_check_uid, &u); + if (!CAMEL_IS_VEE_FOLDER(source)) + g_hash_table_foreach(allhash, (GHFunc)unmatched_check_uid, &u); /* copy any changes so we can raise them outside the lock */ if (camel_folder_change_info_changed(folder_unmatched->changes)) { @@ -1151,7 +1155,7 @@ folder_changed_add_uid(CamelFolder *sub, const char *uid, const char hash[8], Ca vuid = camel_message_info_uid(vinfo); camel_folder_change_info_add_uid(vf->changes, vuid); - if ((vf->flags & CAMEL_STORE_FOLDER_PRIVATE) == 0) { + if ((vf->flags & CAMEL_STORE_FOLDER_PRIVATE) == 0 && !CAMEL_IS_VEE_FOLDER(sub)) { if (g_hash_table_lookup_extended(unmatched_uids, vuid, (void **)&oldkey, (void **)&n)) { g_hash_table_insert(unmatched_uids, oldkey, (void *)(n+1)); } else { @@ -1185,7 +1189,7 @@ folder_changed_remove_uid(CamelFolder *sub, const char *uid, const char hash[8], camel_folder_summary_info_free(folder->summary, (CamelMessageInfo *)vinfo); } - if ((vf->flags & CAMEL_STORE_FOLDER_PRIVATE) == 0) { + if ((vf->flags & CAMEL_STORE_FOLDER_PRIVATE) == 0 && !CAMEL_IS_VEE_FOLDER(sub)) { if (keep) { if (g_hash_table_lookup_extended(unmatched_uids, vuid, (void **)&oldkey, (void **)&n)) { if (n == 1) { @@ -1390,7 +1394,7 @@ folder_changed_change(CamelSession *session, CamelSessionThreadMsg *msg) memcpy(vuid, hash, 8); strcpy(vuid+8, uid); - if (g_hash_table_lookup(unmatched_uids, vuid) == NULL) { + if (!CAMEL_IS_VEE_FOLDER(sub) && g_hash_table_lookup(unmatched_uids, vuid) == NULL) { dd(printf(" adding uid '%s' to Unmatched [newly unmatched]\n", (char *)uid)); vinfo = (CamelVeeMessageInfo *)camel_folder_get_message_info((CamelFolder *)folder_unmatched, vuid); if (vinfo == NULL) { |