reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
ares_destroy.c
Go to the documentation of this file.
1/* Copyright 1998 by the Massachusetts Institute of Technology.
2 *
3 * Permission to use, copy, modify, and distribute this
4 * software and its documentation for any purpose and without
5 * fee is hereby granted, provided that the above copyright
6 * notice appear in all copies and that both that copyright
7 * notice and this permission notice appear in supporting
8 * documentation, and that the name of M.I.T. not be used in
9 * advertising or publicity pertaining to distribution of the
10 * software without specific, written prior permission.
11 * M.I.T. makes no representations about the suitability of
12 * this software for any purpose. It is provided "as is"
13 * without express or implied warranty.
14 */
15
16
17#include <stdlib.h>
18#include "ares.h"
19#include "ares_private.h"
20
21
22
24{
25 ares_destroy_internal(channel, 0);
26}
27
32
34{
35 int i;
36 struct query *query;
37
38 for (i = 0; i < channel->nservers; i++) {
39 ares__close_poll(channel, i);
40 ares__close_sockets(&channel->servers[i]);
41 }
42 free(channel->servers);
43 for (i = 0; i < channel->ndomains; i++)
44 free(channel->domains[i]);
45 free(channel->domains);
46 free(channel->sortlist);
47 free(channel->lookups);
48 while (channel->queries)
49 {
50 query = channel->queries;
51 channel->queries = query->next;
53 {
55 }
58 free(query);
59 }
60 free(channel);
61}
#define ARES_EDESTRUCTION
Definition ares.h:99
void ares__close_poll(ares_channel channel, int server_idx)
void ares__close_sockets(struct server_state *server)
void ares_destroy_internal(ares_channel channel, int suppressCallbacks)
void ares_destroy(ares_channel channel)
void ares_destroy_suppress_callbacks(ares_channel channel)
struct apattern * sortlist
struct query * queries
struct server_state * servers
void * arg
struct query * next
ares_callback callback
int * skip_server
char * tcpbuf
void list()
Definition userAdmin.cxx:66