Ejemplo n.º 1
0
void Curl_global_host_cache_dtor(void)
{
  if (host_cache_initialized) {
    Curl_hash_clean(&hostname_cache);
    host_cache_initialized = 0;
  }
}
Ejemplo n.º 2
0
Archivo: hash.c Proyecto: B-Rich/CMake
void
Curl_hash_destroy(struct curl_hash *h)
{
    if (!h)
        return;

    Curl_hash_clean(h);
    free(h);
}
Ejemplo n.º 3
0
Archivo: hostip.c Proyecto: 54chen/curl
void Curl_hostcache_clean(struct SessionHandle *data,
                          struct curl_hash *hash)
{
  if(data && data->share)
    Curl_share_lock(data, CURL_LOCK_DATA_DNS, CURL_LOCK_ACCESS_SINGLE);

  Curl_hash_clean(hash);

  if(data && data->share)
    Curl_share_unlock(data, CURL_LOCK_DATA_DNS);
}
Ejemplo n.º 4
0
Archivo: hostip.c Proyecto: 4ker/CMake
/*
 * Destroy and cleanup the global DNS cache
 */
void Curl_global_host_cache_dtor(void)
{
  if(host_cache_initialized) {
    /* first make sure that any custom "CURLOPT_RESOLVE" names are
       cleared off */
    Curl_hostcache_clean(NULL, &hostname_cache);
    /* then free the remaining hash completely */
    Curl_hash_clean(&hostname_cache);
    host_cache_initialized = 0;
  }
}
Ejemplo n.º 5
0
void Curl_conncache_destroy(struct conncache *connc)
{
  if(connc)
    Curl_hash_clean(&connc->hash);
}