aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-partition-table.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2002-04-02 07:58:53 +0800
committerMichael Zucci <zucchi@src.gnome.org>2002-04-02 07:58:53 +0800
commit86c9aafb56e8e555871d5fe713aa33d65cf08fc4 (patch)
tree92092c5bb3ff03b9f9ca199ebd867fb97c055116 /camel/camel-partition-table.c
parent785b748a243832932edb20e5fbc5f20efc2bbb00 (diff)
downloadgsoc2013-evolution-86c9aafb56e8e555871d5fe713aa33d65cf08fc4.tar.gz
gsoc2013-evolution-86c9aafb56e8e555871d5fe713aa33d65cf08fc4.tar.zst
gsoc2013-evolution-86c9aafb56e8e555871d5fe713aa33d65cf08fc4.zip
Temporarily disable indexing.
2002-04-02 Not Zed <NotZed@Ximian.com> * providers/local/camel-local-folder.c (camel_local_folder_construct): Temporarily disable indexing. 2002-03-28 Not Zed <NotZed@Ximian.com> * camel-partition-table.c (camel_key_table_lookup): Change range checking assert to a warning. * providers/pop3/camel-pop3-folder.c (pop3_finalize): Make sure we flush out all outstanding commands before finalising, stops being finalised while outsanding requests are processed by the store finalise. (pop3_get_message): Instead of pre-fetching all messages, just pre-fetch a maxiumum number at any one time, stops us running out of cache fd's. * providers/nntp/camel-nntp-folder.c (nntp_folder_init/finalise): Setup priv data + locks, & free. * providers/imap/camel-imap-folder.c (imap_rescan): Batch all message_chagned events into a single folder_changed event (otherwise updates can be >>> expensive, like >5 hours for 80K messages changing!). Alternately it could use folder freeze/unfreeze perhaps. 2002-03-27 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-store.c (imap_keepalive): Pass an exception to called code so it behaves properly since it uses the passed exception to check returns. svn path=/trunk/; revision=16319
Diffstat (limited to 'camel/camel-partition-table.c')
-rw-r--r--camel/camel-partition-table.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/camel/camel-partition-table.c b/camel/camel-partition-table.c
index 48936796dc..c386cbcafa 100644
--- a/camel/camel-partition-table.c
+++ b/camel/camel-partition-table.c
@@ -141,11 +141,19 @@ lookup word, if nameid is deleted, mark it in wordlist as unused and mark for wr
/* ********************************************************************** */
+void
+camel_break_here(void)
+{
+}
+
/* This simple hash seems to work quite well */
static camel_hash_t hash_key(const char *key)
{
camel_hash_t hash = 0xABADF00D;
+ if (strcmp(key, "4852") == 0)
+ camel_break_here();
+
while (*key) {
hash = hash * (*key) ^ (*key);
key++;
@@ -850,8 +858,15 @@ camel_key_table_lookup(CamelKeyTable *ki, camel_key_t keyid, char **keyp, unsign
kb = (CamelKeyBlock *)&bl->data;
- g_assert(kb->used < 127);
+#if 1
+ g_assert(kb->used < 127); /* this should be more accurate */
g_assert(index < kb->used);
+#else
+ if (kb->used >=127 || index >= kb->used) {
+ g_warning("Block %x: Invalid index or content: index %d used %d\n", blockid, index, kb->used);
+ return 0;
+ }
+#endif
CAMEL_KEY_TABLE_LOCK(ki, lock);