Lines Matching full:channel
38 void ares_destroy(ares_channel channel)
45 if (!channel)
48 list_head = &(channel->all_queries);
60 assert(ares__is_list_empty(&(channel->all_queries)));
63 assert(ares__is_list_empty(&(channel->queries_by_qid[i])));
67 assert(ares__is_list_empty(&(channel->queries_by_timeout[i])));
71 ares__destroy_servers_state(channel);
73 if (channel->domains) {
74 for (i = 0; i < channel->ndomains; i++)
75 free(channel->domains[i]);
76 free(channel->domains);
79 if(channel->sortlist)
80 free(channel->sortlist);
82 if (channel->lookups)
83 free(channel->lookups);
85 free(channel);
88 void ares__destroy_servers_state(ares_channel channel)
93 if (channel->servers)
95 for (i = 0; i < channel->nservers; i++)
97 server = &channel->servers[i];
98 ares__close_sockets(channel, server);
101 free(channel->servers);
102 channel->servers = NULL;
104 channel->nservers = -1;