Skip to content

Commit 9c85357

Browse files
committed
Upgrade C-Ares to 1.7.3
1 parent d127d15 commit 9c85357

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+495
-119
lines changed

deps/c-ares/CHANGES

+24-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,30 @@
11
Changelog for the c-ares project
22

3+
Version 1.7.3 (June 11, 2010)
4+
5+
Fixed:
6+
7+
o builds on Android
8+
o now includes all files necessary to build it (1.7.2 lacked a file)
9+
10+
Version 1.7.2 (June 10, 2010)
11+
12+
Changed:
13+
14+
o Added ares_parse_mx_reply()
15+
16+
Fixed:
17+
18+
o ares_init: Last, not first instance of domain or search should win
19+
o improve alternative definition of bool
20+
o fix VS2010 compiler warnings
21+
22+
323
Version 1.7.1 (Mar 23, 2010)
424

25+
* May 31, 2010 (Jakub Hrozek)
26+
- Use the last instance of domain/search, not the first one
27+
528
* March 23, 2010 (Daniel Stenberg)
629
- We switched from CVS to git. See http://github.com/bagder/c-ares
730

@@ -27,7 +50,7 @@ Version 1.7.1 (Mar 23, 2010)
2750
functions do not support IPv6 name servers. This implies that if the user
2851
is capable of defining or providing an IPv6 name server, and the app is
2952
using ares_init_options() or ares_save_options() at some point to handle
30-
the name servers, the app will likely loose IPv6 name servers.
53+
the name servers, the app will likely lose IPv6 name servers.
3154

3255
* January 28, 2010 (Daniel Stenberg)
3356
- Tommie Gannert pointed out a silly bug in ares_process_fd() since it didn't

deps/c-ares/README

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ The following notes apply to c-ares version 1.7.0 and later.
4444
* If you intend to distribute an already compiled c-ares library you _MUST_
4545
also distribute along with it the generated ares_build.h which has been
4646
used to compile it. Otherwise the library will be of no use for the users of
47-
the library that you have built. It is _your_ responsability to provide this
47+
the library that you have built. It is _your_ responsibility to provide this
4848
file. No one at the c-ares project can know how you have built the library.
4949

5050
* File ares_build.h includes platform and configuration dependent info,

deps/c-ares/README.msvc

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
$Id$
21

32

43
___ __ _ _ __ ___ ___

deps/c-ares/README.node

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Library: c-ares, DNS resolver
22

3-
Version: 1.7.1 (23 march, 2010)
3+
Version: 1.7.3 (11 June, 2010)
44

55
Authors: Greg Hudson, Daniel Stenberg
66

deps/c-ares/RELEASE-NOTES

+4-10
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
1-
This is what's new and changed in the c-ares 1.7.1 release:
2-
3-
Changed:
4-
5-
o added IPv6 name servers support
1+
c-ares version 1.7.3
62

73
Fixed:
84

9-
o closing of sockets on Windows systems
10-
o MSVC deprecated compiler options warnings
11-
o ares_process_fd() didn't check broken connections
5+
o builds on Android
6+
o now includes all files necessary to build it (1.7.2 lacked a file)
127

138
Thanks go to these friendly people for their efforts and contributions:
149

15-
Ingmar Runge, Laszlo Tamas Szabo, Yang Tse, Tommie Gannert, Gregor Jasny,
16-
Phil Blundell, Cedric Bail, Jakub Hrozek
10+
Yang Tse, Bogdan Vatra
1711

1812
Have fun!

deps/c-ares/ares.h

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* $Id$ */
21

32
/* Copyright 1998, 2009 by the Massachusetts Institute of Technology.
43
* Copyright (C) 2007-2010 by Daniel Stenberg

deps/c-ares/ares__close_sockets.c

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* $Id$ */
21

32
/* Copyright 1998 by the Massachusetts Institute of Technology.
43
*

deps/c-ares/ares__get_hostent.c

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* $Id$ */
21

32
/* Copyright 1998, 2010 by the Massachusetts Institute of Technology.
43
*

deps/c-ares/ares__read_line.c

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* $Id$ */
21

32
/* Copyright 1998 by the Massachusetts Institute of Technology.
43
*

deps/c-ares/ares__timeval.c

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* $Id$ */
21

32
/* Copyright (C) 2008 by Daniel Stenberg et al
43
*

deps/c-ares/ares_cancel.c

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* $Id$ */
21

32
/* Copyright (C) 2004 by Daniel Stenberg et al
43
*

deps/c-ares/ares_data.c

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* $Id$ */
21

32
/* Copyright (C) 2009-2010 by Daniel Stenberg
43
*

deps/c-ares/ares_data.h

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* $Id$ */
21

32
/* Copyright (C) 2009-2010 by Daniel Stenberg
43
*

deps/c-ares/ares_destroy.c

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* $Id$ */
21

32
/* Copyright 1998 by the Massachusetts Institute of Technology.
43
* Copyright (C) 2004-2010 by Daniel Stenberg

deps/c-ares/ares_dns.h

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* $Id$ */
21

32
/* Copyright 1998 by the Massachusetts Institute of Technology.
43
*

deps/c-ares/ares_expand_name.c

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* $Id$ */
21

32
/* Copyright 1998 by the Massachusetts Institute of Technology.
43
*

deps/c-ares/ares_expand_string.c

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* $Id$ */
21

32
/* Copyright 1998 by the Massachusetts Institute of Technology.
43
*

deps/c-ares/ares_fds.c

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* $Id$ */
21

32
/* Copyright 1998 by the Massachusetts Institute of Technology.
43
*

deps/c-ares/ares_free_hostent.c

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* $Id$ */
21

32
/* Copyright 1998 by the Massachusetts Institute of Technology.
43
*

deps/c-ares/ares_free_string.c

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* $Id$ */
21

32
/* Copyright 2000 by the Massachusetts Institute of Technology.
43
*

deps/c-ares/ares_gethostbyaddr.c

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* $Id$ */
21

32
/* Copyright 1998 by the Massachusetts Institute of Technology.
43
*
@@ -191,8 +190,8 @@ static int file_lookup(struct ares_addr *addr, struct hostent **host)
191190
char tmp[MAX_PATH];
192191
HKEY hkeyHosts;
193192

194-
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, WIN_NS_NT_KEY, 0, KEY_READ, &hkeyHosts)
195-
== ERROR_SUCCESS)
193+
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, WIN_NS_NT_KEY, 0, KEY_READ,
194+
&hkeyHosts) == ERROR_SUCCESS)
196195
{
197196
DWORD dwLength = MAX_PATH;
198197
RegQueryValueEx(hkeyHosts, DATABASEPATH, NULL, NULL, (LPBYTE)tmp,
@@ -241,12 +240,14 @@ static int file_lookup(struct ares_addr *addr, struct hostent **host)
241240
}
242241
if (addr->family == AF_INET)
243242
{
244-
if (memcmp((*host)->h_addr, &addr->addrV4, sizeof(addr->addrV4)) == 0)
243+
if (memcmp((*host)->h_addr, &addr->addrV4,
244+
sizeof(addr->addrV4)) == 0)
245245
break;
246246
}
247247
else if (addr->family == AF_INET6)
248248
{
249-
if (memcmp((*host)->h_addr, &addr->addrV6, sizeof(addr->addrV6)) == 0)
249+
if (memcmp((*host)->h_addr, &addr->addrV6,
250+
sizeof(addr->addrV6)) == 0)
250251
break;
251252
}
252253
ares_free_hostent(*host);

deps/c-ares/ares_gethostbyname.c

+19-17
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* $Id$ */
21

32
/* Copyright 1998 by the Massachusetts Institute of Technology.
43
*
@@ -151,8 +150,8 @@ static void next_lookup(struct host_query *hquery, int status_code)
151150
}
152151
else {
153152
hquery->sent_family = AF_INET;
154-
ares_search(hquery->channel, hquery->name, C_IN, T_A, host_callback,
155-
hquery);
153+
ares_search(hquery->channel, hquery->name, C_IN, T_A,
154+
host_callback, hquery);
156155
}
157156
return;
158157

@@ -195,9 +194,10 @@ static void host_callback(void *arg, int status, int timeouts,
195194
{
196195
status = ares_parse_aaaa_reply(abuf, alen, &host, NULL, NULL);
197196
if (status == ARES_ENODATA || status == ARES_EBADRESP) {
198-
/* The query returned something but either there were no AAAA records (e.g. just CNAME)
199-
or the response was malformed. Try looking up A instead.
200-
We should possibly limit this attempt-next logic to AF_UNSPEC lookups only. */
197+
/* The query returned something but either there were no AAAA
198+
records (e.g. just CNAME) or the response was malformed. Try
199+
looking up A instead. We should possibly limit this
200+
attempt-next logic to AF_UNSPEC lookups only. */
201201
hquery->sent_family = AF_INET;
202202
ares_search(hquery->channel, hquery->name, C_IN, T_A,
203203
host_callback, hquery);
@@ -208,10 +208,12 @@ static void host_callback(void *arg, int status, int timeouts,
208208
}
209209
end_hquery(hquery, status, host);
210210
}
211-
else if ((status == ARES_ENODATA || status == ARES_EBADRESP || status == ARES_ETIMEOUT) && hquery->sent_family == AF_INET6)
211+
else if ((status == ARES_ENODATA || status == ARES_EBADRESP ||
212+
status == ARES_ETIMEOUT) && hquery->sent_family == AF_INET6)
212213
{
213-
/* The AAAA query yielded no useful result. Now look up an A instead.
214-
We should possibly limit this attempt-next logic to AF_UNSPEC lookups only. */
214+
/* The AAAA query yielded no useful result. Now look up an A instead.
215+
We should possibly limit this attempt-next logic to AF_UNSPEC lookups
216+
only. */
215217
hquery->sent_family = AF_INET;
216218
ares_search(hquery->channel, hquery->name, C_IN, T_A, host_callback,
217219
hquery);
@@ -235,8 +237,8 @@ static void end_hquery(struct host_query *hquery, int status,
235237
/* If the name looks like an IP address, fake up a host entry, end the
236238
* query immediately, and return true. Otherwise return false.
237239
*/
238-
static int fake_hostent(const char *name, int family, ares_host_callback callback,
239-
void *arg)
240+
static int fake_hostent(const char *name, int family,
241+
ares_host_callback callback, void *arg)
240242
{
241243
struct hostent hostent;
242244
char *aliases[1] = { NULL };
@@ -346,8 +348,8 @@ static int file_lookup(const char *name, int family, struct hostent **host)
346348
char tmp[MAX_PATH];
347349
HKEY hkeyHosts;
348350

349-
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, WIN_NS_NT_KEY, 0, KEY_READ, &hkeyHosts)
350-
== ERROR_SUCCESS)
351+
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, WIN_NS_NT_KEY, 0, KEY_READ,
352+
&hkeyHosts) == ERROR_SUCCESS)
351353
{
352354
DWORD dwLength = MAX_PATH;
353355
RegQueryValueEx(hkeyHosts, DATABASEPATH, NULL, NULL, (LPBYTE)tmp,
@@ -408,8 +410,8 @@ static int file_lookup(const char *name, int family, struct hostent **host)
408410
return status;
409411
}
410412

411-
static void sort_addresses(struct hostent *host, const struct apattern *sortlist,
412-
int nsort)
413+
static void sort_addresses(struct hostent *host,
414+
const struct apattern *sortlist, int nsort)
413415
{
414416
struct in_addr a1, a2;
415417
int i1, i2, ind1, ind2;
@@ -464,8 +466,8 @@ static int get_address_index(const struct in_addr *addr,
464466
return i;
465467
}
466468

467-
static void sort6_addresses(struct hostent *host, const struct apattern *sortlist,
468-
int nsort)
469+
static void sort6_addresses(struct hostent *host,
470+
const struct apattern *sortlist, int nsort)
469471
{
470472
struct ares_in6_addr a1, a2;
471473
int i1, i2, ind1, ind2;

deps/c-ares/ares_getnameinfo.c

+22-13
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* $Id$ */
21

32
/* Copyright 2005 by Dominick Meglio
43
*
@@ -81,7 +80,8 @@ struct nameinfo_query {
8180
(sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"))
8281
#endif
8382

84-
static void nameinfo_callback(void *arg, int status, int timeouts, struct hostent *host);
83+
static void nameinfo_callback(void *arg, int status, int timeouts,
84+
struct hostent *host);
8585
static char *lookup_service(unsigned short port, int flags,
8686
char *buf, size_t buflen);
8787
#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
@@ -202,7 +202,8 @@ void ares_getnameinfo(ares_channel channel, const struct sockaddr *sa,
202202
}
203203
}
204204

205-
static void nameinfo_callback(void *arg, int status, int timeouts, struct hostent *host)
205+
static void nameinfo_callback(void *arg, int status, int timeouts,
206+
struct hostent *host)
206207
{
207208
struct nameinfo_query *niquery = (struct nameinfo_query *) arg;
208209
char srvbuf[33];
@@ -221,8 +222,8 @@ static void nameinfo_callback(void *arg, int status, int timeouts, struct hosten
221222
service = lookup_service(niquery->addr.addr6.sin6_port,
222223
niquery->flags, srvbuf, sizeof(srvbuf));
223224
}
224-
/* NOFQDN means we have to strip off the domain name portion.
225-
We do this by determining our own domain name, then searching the string
225+
/* NOFQDN means we have to strip off the domain name portion. We do
226+
this by determining our own domain name, then searching the string
226227
for this domain name and removing it.
227228
*/
228229
#ifdef HAVE_GETHOSTNAME
@@ -239,7 +240,8 @@ static void nameinfo_callback(void *arg, int status, int timeouts, struct hosten
239240
}
240241
}
241242
#endif
242-
niquery->callback(niquery->arg, ARES_SUCCESS, niquery->timeouts, (char *)(host->h_name),
243+
niquery->callback(niquery->arg, ARES_SUCCESS, niquery->timeouts,
244+
(char *)(host->h_name),
243245
service);
244246
return;
245247
}
@@ -248,12 +250,15 @@ static void nameinfo_callback(void *arg, int status, int timeouts, struct hosten
248250
{
249251
char ipbuf[IPBUFSIZ];
250252
if (niquery->family == AF_INET)
251-
ares_inet_ntop(AF_INET, &niquery->addr.addr4.sin_addr, ipbuf, IPBUFSIZ);
253+
ares_inet_ntop(AF_INET, &niquery->addr.addr4.sin_addr, ipbuf,
254+
IPBUFSIZ);
252255
else
253256
{
254-
ares_inet_ntop(AF_INET6, &niquery->addr.addr6.sin6_addr, ipbuf, IPBUFSIZ);
257+
ares_inet_ntop(AF_INET6, &niquery->addr.addr6.sin6_addr, ipbuf,
258+
IPBUFSIZ);
255259
#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
256-
append_scopeid(&niquery->addr.addr6, niquery->flags, ipbuf, sizeof(ipbuf));
260+
append_scopeid(&niquery->addr.addr6, niquery->flags, ipbuf,
261+
sizeof(ipbuf));
257262
#endif
258263
}
259264
/* They want a service too */
@@ -266,7 +271,8 @@ static void nameinfo_callback(void *arg, int status, int timeouts, struct hosten
266271
service = lookup_service(niquery->addr.addr6.sin6_port,
267272
niquery->flags, srvbuf, sizeof(srvbuf));
268273
}
269-
niquery->callback(niquery->arg, ARES_SUCCESS, niquery->timeouts, ipbuf, service);
274+
niquery->callback(niquery->arg, ARES_SUCCESS, niquery->timeouts, ipbuf,
275+
service);
270276
return;
271277
}
272278
niquery->callback(niquery->arg, status, niquery->timeouts, NULL, NULL);
@@ -301,10 +307,12 @@ static char *lookup_service(unsigned short port, int flags,
301307
sep = &se;
302308
memset(tmpbuf, 0, sizeof(tmpbuf));
303309
#if GETSERVBYPORT_R_ARGS == 6
304-
if (getservbyport_r(port, proto, &se, (void *)tmpbuf, sizeof(tmpbuf), &sep) != 0)
310+
if (getservbyport_r(port, proto, &se, (void *)tmpbuf,
311+
sizeof(tmpbuf), &sep) != 0)
305312
sep = NULL;
306313
#elif GETSERVBYPORT_R_ARGS == 5
307-
sep = getservbyport_r(port, proto, &se, (void *)tmpbuf, sizeof(tmpbuf));
314+
sep = getservbyport_r(port, proto, &se, (void *)tmpbuf,
315+
sizeof(tmpbuf));
308316
#elif GETSERVBYPORT_R_ARGS == 4
309317
if (getservbyport_r(port, proto, &se, (void *)tmpbuf) != 0)
310318
sep = NULL;
@@ -350,7 +358,8 @@ static void append_scopeid(struct sockaddr_in6 *addr6, unsigned int flags,
350358
char fmt_lu[] = "%lu";
351359
char tmpbuf[IF_NAMESIZE + 2];
352360
size_t bufl;
353-
char *fmt = (sizeof(addr6->sin6_scope_id) > sizeof(unsigned int))?fmt_lu:fmt_u;
361+
char *fmt = (sizeof(addr6->sin6_scope_id) > sizeof(unsigned int))?
362+
fmt_lu:fmt_u;
354363

355364
tmpbuf[0] = '%';
356365

deps/c-ares/ares_getopt.c

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
* on 2007-04-11. Lifted from version 5.2 of the 'Open Mash' project with
44
* the modified BSD license, BSD license without the advertising clause.
55
*
6-
* $Id$
76
*/
87

98
/*

deps/c-ares/ares_getsock.c

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* $Id$ */
21

32
/* Copyright (C) 2005 - 2010, Daniel Stenberg
43
*

0 commit comments

Comments
 (0)