From 917d6bd3c44476d032f40b61b6e49ce2ea76494e Mon Sep 17 00:00:00 2001 From: Xavier Roche Date: Sat, 10 May 2014 19:08:05 +0000 Subject: Better logging for hashtables --- src/proxy/store.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/proxy/store.c') diff --git a/src/proxy/store.c b/src/proxy/store.c index 9d756b7..daa9952 100644 --- a/src/proxy/store.c +++ b/src/proxy/store.c @@ -238,6 +238,7 @@ PT_Indexes PT_New(void) { PT_Indexes index = (PT_Indexes) calloc(sizeof(_PT_Indexes), 1); index->cil = inthash_new(0); + inthash_set_name(index->cil, "index->cil"); index->index_size = 0; index->index = NULL; return index; @@ -432,8 +433,10 @@ char **PT_Enumerate(PT_Indexes indexes, const char *url, int subtree) { inthash_chain *chain; inthash hdupes = NULL; - if (!subtree) + if (!subtree) { hdupes = inthash_new(0); + inthash_set_name(hdupes, "hdupes"); + } StringClear(list); StringClear(listindexes); StringClear(subitem); @@ -551,6 +554,7 @@ PT_Index PT_LoadCache(const char *filename) { index->slots.common.timestamp = (time_t) time(NULL); index->slots.common.startUrl[0] = '\0'; index->slots.common.hash = inthash_new(0); + inthash_set_name(index->slots.common.hash, "index->slots.common.hash"); if (!_IndexFuncts[type].PT_LoadCache(index, filename)) { proxytrack_print_log(DEBUG, "reading httrack cache (format #%d) %s : error", -- cgit v1.2.3