diff options
author | Not Zed <NotZed@Ximian.com> | 2001-07-05 11:13:52 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2001-07-05 11:13:52 +0800 |
commit | bf20209bbbbab216918ff84d435a8e98e22c0601 (patch) | |
tree | 73614b4f2d20896425286912a54110b0afbfa3d3 /camel/providers | |
parent | dcb5ea4101ffdd79ff7849867f8c32426e88da7f (diff) | |
download | gsoc2013-evolution-bf20209bbbbab216918ff84d435a8e98e22c0601.tar gsoc2013-evolution-bf20209bbbbab216918ff84d435a8e98e22c0601.tar.gz gsoc2013-evolution-bf20209bbbbab216918ff84d435a8e98e22c0601.tar.bz2 gsoc2013-evolution-bf20209bbbbab216918ff84d435a8e98e22c0601.tar.lz gsoc2013-evolution-bf20209bbbbab216918ff84d435a8e98e22c0601.tar.xz gsoc2013-evolution-bf20209bbbbab216918ff84d435a8e98e22c0601.tar.zst gsoc2013-evolution-bf20209bbbbab216918ff84d435a8e98e22c0601.zip |
When indexing a new record, create a pseudo word 'ibexindexed' so we can
2001-07-05 Not Zed <NotZed@Ximian.com>
* camel-folder-summary.c
(camel_folder_summary_info_new_from_message): When indexing a new
record, create a pseudo word 'ibexindexed' so we can always tell
that a message has already been idnexed, even if it contains no
words of its own. Things like maildir use this check to see if
its already been processed, and it matters if it is incorrect in
this case (not just wasted cycles).
(camel_folder_summary_info_new_from_parser): And same here.
* providers/local/camel-maildir-summary.c (maildir_summary_sync):
Changed the logicfor epoolv code to be different, we dont need to
update hash references or any tricky stuff.
(maildir_summary_check): Samehere.
* camel-folder-summary.h: Removed include of e-memory.h.
svn path=/trunk/; revision=10785
Diffstat (limited to 'camel/providers')
-rw-r--r-- | camel/providers/local/camel-maildir-summary.c | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/camel/providers/local/camel-maildir-summary.c b/camel/providers/local/camel-maildir-summary.c index ee9411c297..bc7bf790bd 100644 --- a/camel/providers/local/camel-maildir-summary.c +++ b/camel/providers/local/camel-maildir-summary.c @@ -580,26 +580,23 @@ maildir_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changes, Ca filename = camel_maildir_info_filename(mdi); /* TODO: only store the extension in the mdi->filename struct, not the whole lot */ if (filename == NULL || strcmp(filename, d->d_name) != 0) { -#if defined (DOEPOOLV) || defined (DOESTRV) +#ifdef DOESTRV #warning "cannot modify the estrv after its been setup, for mt-safe code" - d(printf("filename changed: %s to %s\n", filename, d->d_name)); - - /* need to update the summary hash string reference since it might (will) change */ CAMEL_SUMMARY_LOCK(s, summary_lock); - g_hash_table_remove(s->messages_uid, uid); -#ifdef DOEPOOLV - info->strings = e_poolv_set(info->strings, CAMEL_MAILDIR_INFO_FILENAME, d->d_name, FALSE); -#else + /* need to update the summary hash ref */ + g_hash_table_remove(s->messages_uid, camel_message_info_uid(info)); info->strings = e_strv_set_ref(info->strings, CAMEL_MAILDIR_INFO_FILENAME, d->d_name); - /* we need to re-pack as well */ info->strings = e_strv_pack(info->strings); -#endif /* DOEPOOLV */ g_hash_table_insert(s->messages_uid, (char *)camel_message_info_uid(info), info); CAMEL_SUMMARY_UNLOCK(s, summary_lock); -#else /* defined (DOEPOOLV) || defined (DOESTRV) */ +#else +# ifdef DOEPOOLV + info->strings = e_poolv_set(info->strings, CAMEL_MAILDIR_INFO_FILENAME, d->d_name, FALSE); +# else g_free(mdi->filename); mdi->filename = g_strdup(d->d_name); -#endif +# endif +#endif } camel_folder_summary_info_free((CamelFolderSummary *)cls, info); } @@ -681,7 +678,7 @@ maildir_summary_sync(CamelLocalSummary *cls, gboolean expunge, CamelFolderChange int count, i; CamelMessageInfo *info; CamelMaildirMessageInfo *mdi; -#if defined (DOEPOOLV) || defined (DOESTRV) +#ifdef DOESTRV CamelFolderSummary *s = (CamelFolderSummary *)cls; #endif char *name; @@ -732,22 +729,23 @@ maildir_summary_sync(CamelLocalSummary *cls, gboolean expunge, CamelFolderChange /* TODO: If this is made mt-safe, then this code could be a problem, since the estrv is being modified. Sigh, this may mean the maildir name has to be cached another way */ -#if defined (DOEPOOLV) || defined (DOESTRV) +#ifdef DOESTRV #warning "cannot modify the estrv after its been setup, for mt-safe code" CAMEL_SUMMARY_LOCK(s, summary_lock); /* need to update the summary hash ref */ g_hash_table_remove(s->messages_uid, camel_message_info_uid(info)); -#ifdef DOEPOOLV - info->strings = e_poolv_set(info->strings, CAMEL_MAILDIR_INFO_FILENAME, newname, TRUE); -#else info->strings = e_strv_set_ref_free(info->strings, CAMEL_MAILDIR_INFO_FILENAME, newname); info->strings = e_strv_pack(info->strings); -#endif /* DOEPOOLV */ g_hash_table_insert(s->messages_uid, (char *)camel_message_info_uid(info), info); CAMEL_SUMMARY_UNLOCK(s, summary_lock); -#else /* defined (DOEPOOLV) || defined (DOESTRV) */ +#else +# ifdef DOEPOOLV + info->strings = e_poolv_set(info->strings, CAMEL_MAILDIR_INFO_FILENAME, newname, TRUE); + g_free(newname); +# else g_free(mdi->filename); mdi->filename = newname; +# endif #endif } g_free(name); |