diff options
author | Not Zed <NotZed@Ximian.com> | 2002-01-30 13:14:48 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2002-01-30 13:14:48 +0800 |
commit | b894c24f03beeaaeb947676f95c05473ee7691d4 (patch) | |
tree | e940ee60ed72b74e034003a2d44b5bf9d3632852 /camel/camel-data-cache.c | |
parent | 22d1017461bcf5c16846721fd5106abff3f7689b (diff) | |
download | gsoc2013-evolution-b894c24f03beeaaeb947676f95c05473ee7691d4.tar.gz gsoc2013-evolution-b894c24f03beeaaeb947676f95c05473ee7691d4.tar.zst gsoc2013-evolution-b894c24f03beeaaeb947676f95c05473ee7691d4.zip |
Changed name from "NT Login" to simply "Login".
2002-01-30 Not Zed <NotZed@Ximian.com>
* camel-sasl-login.c: Changed name from "NT Login" to simply
"Login".
* providers/pop3/*: Entirely new pop implmentation, supporting
pipelining.
2002-01-29 Not Zed <NotZed@Ximian.com>
* camel-data-cache.c (free_busy): We dont want to unref the
stream, instead, stop listening to the finalised events, and free
the path only.
2002-01-25 Not Zed <NotZed@Ximian.com>
* camel-data-cache.c (stream_finalised): Remove the object from
the busy_stream hashtable, not the busy_path hashtable.
svn path=/trunk/; revision=15521
Diffstat (limited to 'camel/camel-data-cache.c')
-rw-r--r-- | camel/camel-data-cache.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/camel/camel-data-cache.c b/camel/camel-data-cache.c index 5fa7a40de4..c2b8ac8bd2 100644 --- a/camel/camel-data-cache.c +++ b/camel/camel-data-cache.c @@ -41,6 +41,9 @@ extern int camel_verbose_debug; #define dd(x) (camel_verbose_debug?(x):0) +#define d(x) + +static void stream_finalised(CamelObject *o, void *event_data, void *data); /* how many 'bits' of hash are used to key the toplevel directory */ #define CAMEL_DATA_CACHE_BITS (6) @@ -97,8 +100,10 @@ static void data_cache_init(CamelDataCache *cdc, CamelDataCacheClass *klass) } static void -free_busy(CamelStream *stream, char *path, void *data) +free_busy(CamelStream *stream, char *path, CamelDataCache *cdc) { + d(printf(" Freeing busy stream %p path %s\n", stream, path)); + camel_object_unhook_event((CamelObject *)stream, "finalize", stream_finalised, cdc); camel_object_unref((CamelObject *)stream); g_free(path); } @@ -109,7 +114,9 @@ static void data_cache_finalise(CamelDataCache *cdc) p = cdc->priv; - g_hash_table_foreach(p->busy_stream, (GHFunc)free_busy, NULL); + d(printf("cache finalised, %d (= %d?) streams reamining\n", g_hash_table_size(p->busy_stream), g_hash_table_size(p->busy_path))); + + g_hash_table_foreach(p->busy_stream, (GHFunc)free_busy, cdc); g_hash_table_destroy(p->busy_path); g_hash_table_destroy(p->busy_stream); @@ -294,12 +301,17 @@ stream_finalised(CamelObject *o, void *event_data, void *data) CamelDataCache *cdc = data; char *key; + d(printf("Stream finalised '%p'\n", data)); + CDC_LOCK(cdc, lock); key = g_hash_table_lookup(cdc->priv->busy_stream, o); if (key) { + d(printf(" For path '%s'\n", key)); g_hash_table_remove(cdc->priv->busy_path, key); - g_hash_table_remove(cdc->priv->busy_path, o); + g_hash_table_remove(cdc->priv->busy_stream, o); g_free(key); + } else { + d(printf(" Unknown stream?!\n")); } CDC_UNLOCK(cdc, lock); } |