diff options
author | Sterling Hughes <sterling@bumblebury.com> | 2002-01-07 20:52:32 +0000 |
---|---|---|
committer | Sterling Hughes <sterling@bumblebury.com> | 2002-01-07 20:52:32 +0000 |
commit | 8d7f402efbcace85851c6bb8f6aa2452c15a9595 (patch) | |
tree | 4faf3a7b90bca33494801df5e0b58415d3ff39c3 /lib/hash.c | |
parent | d3299beec734be02a781c393a994d525e3eaaac1 (diff) |
Make cach'ing work with threads now, there are now three cases:
- Use a global dns cache (via setting the tentatively named,
CURLOPT_DNS_USE_GLOBAL_CACHE option to true)
- Use a per-handle dns cache, by default
- Use a pooled dns cache when in the "multi" interface
Diffstat (limited to 'lib/hash.c')
-rw-r--r-- | lib/hash.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/hash.c b/lib/hash.c index c0680e488..1ed3cc21a 100644 --- a/lib/hash.c +++ b/lib/hash.c @@ -255,11 +255,22 @@ curl_hash_clean(curl_hash *h) h->table = NULL; } +size_t +curl_hash_count(curl_hash *h) +{ + return h->size; +} + void curl_hash_destroy(curl_hash *h) { + if (!h) { + return; + } + curl_hash_clean(h); free(h); + h = NULL; } /* |