diff options
author | Jorge Arellano Cid <jcid@dillo.org> | 2009-01-01 10:06:48 -0300 |
---|---|---|
committer | Jorge Arellano Cid <jcid@dillo.org> | 2009-01-01 10:06:48 -0300 |
commit | 9783b0f015c4437f1c3c457caacaecadc06ae644 (patch) | |
tree | 84c3ba69d48f3840799e8096077ba03778254108 /src/cache.c | |
parent | a242c0021263fc48fa57d1e4c1a874713745f590 (diff) |
imported patch dicache-cleanup5
Diffstat (limited to 'src/cache.c')
-rw-r--r-- | src/cache.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cache.c b/src/cache.c index 831ad411..c1bdcec1 100644 --- a/src/cache.c +++ b/src/cache.c @@ -161,6 +161,7 @@ static int Cache_client_enqueue(const DilloUrl *Url, DilloWeb *Web, ClientKey = Cache_client_make_key(); NewClient->Key = ClientKey; NewClient->Url = Url; + NewClient->Version = 0; NewClient->Buf = NULL; NewClient->Callback = Callback; NewClient->CbData = CbData; @@ -1258,9 +1259,14 @@ CacheClient_t *a_Cache_client_get_if_unique(int Key) void a_Cache_stop_client(int Key) { CacheClient_t *Client; + DICacheEntry *DicEntry; if ((Client = dList_find_custom(ClientQueue, INT2VOIDP(Key), Cache_client_by_key_cmp))) { + DicEntry = a_Dicache_get_entry(Client->Url, Client->Version); + if (DicEntry) { + a_Dicache_unref(Client->Url, Client->Version); + } Cache_client_dequeue(Client, NULLKey); } else { _MSG("WARNING: Cache_stop_client, nonexistent client\n"); |